From 6da10cf062cecf803124b935c7dc338b97b63d75 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Wed, 7 Jun 2017 11:04:44 +0100 Subject: [PATCH] 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 --- drivers/event/sw/sw_evdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++; } -- 2.20.1