Skip to content

Commit

Permalink
event/dsw: ignore scheduling type for single-link queues
Browse files Browse the repository at this point in the history
[ upstream commit 7e192bd ]

The scheduling type parameter is not applicable for single link
queues. DSW would, at the time of rte_event_queue_setup(), erroneously
verify that scheduling type was one of the supported types, and
returned -ENOTSUP in case of RTE_SCHED_TYPE_ORDERED.

Fixes: 4540ee9 ("event/dsw: add device and queue configuration")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Gage Eads <gage.eads@intel.com>
  • Loading branch information
m-ronnblom authored and kevintraynor committed May 14, 2019
1 parent 897b241 commit c8a8ccd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/event/dsw/dsw_evdev.c
Expand Up @@ -102,9 +102,6 @@ dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
if (RTE_EVENT_QUEUE_CFG_ALL_TYPES & conf->event_queue_cfg)
return -ENOTSUP;

if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
return -ENOTSUP;

/* SINGLE_LINK is better off treated as TYPE_ATOMIC, since it
* avoid the "fake" TYPE_PARALLEL flow_id assignment. Since
* the queue will only have a single serving port, no
Expand All @@ -113,8 +110,12 @@ dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
*/
if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK & conf->event_queue_cfg)
queue->schedule_type = RTE_SCHED_TYPE_ATOMIC;
else /* atomic or parallel */
else {
if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
return -ENOTSUP;
/* atomic or parallel */
queue->schedule_type = conf->schedule_type;
}

queue->num_serving_ports = 0;

Expand Down

0 comments on commit c8a8ccd

Please sign in to comment.