[PATCH v3 5/7] event/dlb2: fix to avoid credit release race condition

Pravin Pathak pravin.pathak at intel.com
Tue Jun 17 20:26:28 CEST 2025


While unlinking ports, all associated credits should be released.
This commit avoids race condition when main thread is unlinking
while workers are running.

Fixes: a29248b57b31 ("event/dlb2: add port unlink and unlinks in progress")
Cc: stable at dpdk.org

Signed-off-by: Pravin Pathak <pravin.pathak at intel.com>
---
 drivers/event/dlb2/dlb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 28c9054f63..6734e93eac 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -2664,7 +2664,7 @@ dlb2_eventdev_port_unlink(struct rte_eventdev *dev, void *event_port,
 		DLB2_LOG_LINE_DBG("dlb2: ignore unlink from dir port %d",
 			     ev_port->id);
 		rte_errno = 0;
-		return nb_unlinks; /* as if success */
+		goto ret_credits;
 	}
 
 	dlb2 = ev_port->dlb2;
-- 
2.39.1



More information about the dev mailing list