From: Pravin Pathak <pravinpathakdev@gmail.com>
To: dev@dpdk.org
Cc: jerinj@marvell.com, tirthendu.sarkar@intel.com,
bruce.richardson@intel.com, thomas@monjalon.net,
david.marchand@redhat.com, pravin.pathak.dev@gmail.com
Subject: [PATCH v1] event/dlb2: race condition during dynamic linking
Date: Wed, 21 Oct 2026 13:20:41 -0400 [thread overview]
Message-ID: <20261021172041.433881-1-pravin.pathak.dev@gmail.com> (raw)
dlb2 handles dynamic linking and linking asynchronously if queues
being linked/unlinked have traffic. It starts a thread if not already
started to handle the process. This change avoids the race condition
in thread creation where sometimes the thread starts immediately,
descheduling the calling thread and finishes the job and exits, and then
caller sets worker launched true when the thread is not running.
Signed-off-by: Pravin Pathak <pravin.pathak.dev@gmail.com>
---
drivers/event/dlb2/pf/base/dlb2_osdep.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/event/dlb2/pf/base/dlb2_osdep.h b/drivers/event/dlb2/pf/base/dlb2_osdep.h
index 382a49090a..1505563f83 100644
--- a/drivers/event/dlb2/pf/base/dlb2_osdep.h
+++ b/drivers/event/dlb2/pf/base/dlb2_osdep.h
@@ -208,14 +208,16 @@ static inline void os_schedule_work(struct dlb2_hw *hw)
dlb2_dev = container_of(hw, struct dlb2_dev, hw);
+ dlb2_dev->worker_launched = true;
+
ret = rte_thread_create_internal_control(&complete_queue_map_unmap_thread,
"dlb-qunmap", dlb2_complete_queue_map_unmap, dlb2_dev);
- if (ret)
+ if (ret) {
DLB2_ERR(dlb2_dev,
"Could not create queue complete map/unmap thread, err=%d\n",
ret);
- else
- dlb2_dev->worker_launched = true;
+ dlb2_dev->worker_launched = false;
+ }
}
/**
--
2.53.0
next reply other threads:[~2026-10-21 17:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 17:20 Pravin Pathak [this message]
2026-10-22 16:46 ` [PATCH v1] event/dlb2: race condition during dynamic linking Sarkar, Tirthendu
2026-10-23 12:49 ` Jerin Jacob
2026-10-22 16:51 ` Bruce Richardson
2026-10-27 21:00 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261021172041.433881-1-pravin.pathak.dev@gmail.com \
--to=pravinpathakdev@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=pravin.pathak.dev@gmail.com \
--cc=thomas@monjalon.net \
--cc=tirthendu.sarkar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.