DPDK patches and discussions
 help / color / mirror / Atom feed
* [Bug 1290] rte_exit will hang if called from worker or service thread
@ 2023-09-18 18:53 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2023-09-18 18:53 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1290

            Bug ID: 1290
           Summary: rte_exit will hang if called from worker or service
                    thread
           Product: DPDK
           Version: 23.07
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

Calling rte_exit in a thread other than main thread won't work because
the cleanup code is calling rte_eal_cleanup, and inside that it ends
up waiting for all workers.  Since the thread you are calling from
is a worker, it ends up waiting for itself.

rte_exit()
        rte_eal_cleanup()
                rte_service_finalize()
                        rte_eal_mp_wait_lcore()


void
rte_eal_mp_wait_lcore(void)
{
        unsigned lcore_id;

        RTE_LCORE_FOREACH_WORKER(lcore_id) {
                rte_eal_wait_lcore(lcore_id);
        }
}

Either service handling needs to be smarter, the rte_exit() function
check if it is called from main lcore, and/or documentation needs update.
Not a simple fix because in order to safely do the cleanup logic
all threads have to gone to a quiescent state.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 3268 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-18 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-18 18:53 [Bug 1290] rte_exit will hang if called from worker or service thread bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).