From: Harry van Haaren Date: Wed, 7 Jun 2017 10:04:44 +0000 (+0100) Subject: event/sw: fix mapped qid count with parallel queue X-Git-Tag: spdx-start~2975 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6da10cf062cecf803124b935c7dc338b97b63d75;p=dpdk.git event/sw: fix mapped qid count with parallel queue This commit fixes the counting of mapped queues to a port, when the type of queue type is PARALLEL. Not incrementing the count here could lead to an underflow of the count when unlinking at a later date. Fixes: 371a688fc159 ("event/sw: support linking queues to ports") Reported-by: Jesse Bruni Signed-off-by: Harry van Haaren --- diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 7f69e38832..bc834a9642 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -90,7 +90,8 @@ sw_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[], } else if (q->type == RTE_SCHED_TYPE_ORDERED) { p->num_ordered_qids++; p->num_qids_mapped++; - } else if (q->type == RTE_SCHED_TYPE_ATOMIC) { + } else if (q->type == RTE_SCHED_TYPE_ATOMIC || + q->type == RTE_SCHED_TYPE_PARALLEL) { p->num_qids_mapped++; }