DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: add rte_exit() main lcore limitation description
@ 2021-07-14 14:13 Suanming Mou
  2023-06-30  3:37 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Suanming Mou @ 2021-07-14 14:13 UTC (permalink / raw)
  To: thomas, david.marchand; +Cc: dev

Currently, rte_eal_mp_wait_lcore() function will be called by rte_exit()
as the routine below:
rte_exit() -> rte_eal_cleanup() -> rte_service_finalize() ->
rte_eal_mp_wait_lcore()

As rte_eal_mp_wait_lcore() is announced can only be called from main lcore,
rte_exit() gets the limitation implicitly as well. Or once rte_exit() is
called from a worker core, the rte_exit() procedure will get stuck in the
rte_eal_mp_wait_lcore() function as the core status is still running.

This commit adds the limitation to rte_exit() to make things clear.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
 lib/eal/include/rte_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index d5a32c66a5..ebe2869cc3 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -857,7 +857,7 @@ rte_str_to_size(const char *str)
  * Function to terminate the application immediately, printing an error
  * message and returning the exit_code back to the shell.
  *
- * This function never returns
+ * To be executed on the MAIN lcore only. This function never returns.
  *
  * @param exit_code
  *     The exit code to be returned by the application
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: add rte_exit() main lcore limitation description
  2021-07-14 14:13 [dpdk-dev] [PATCH] eal: add rte_exit() main lcore limitation description Suanming Mou
@ 2023-06-30  3:37 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2023-06-30  3:37 UTC (permalink / raw)
  To: Suanming Mou, harry.van.haaren; +Cc: thomas, david.marchand, dev

On Wed, 14 Jul 2021 17:13:00 +0300
Suanming Mou <suanmingm@nvidia.com> wrote:

> Currently, rte_eal_mp_wait_lcore() function will be called by rte_exit()
> as the routine below:
> rte_exit() -> rte_eal_cleanup() -> rte_service_finalize() ->
> rte_eal_mp_wait_lcore()
> 
> As rte_eal_mp_wait_lcore() is announced can only be called from main lcore,
> rte_exit() gets the limitation implicitly as well. Or once rte_exit() is
> called from a worker core, the rte_exit() procedure will get stuck in the
> rte_eal_mp_wait_lcore() function as the core status is still running.
> 
> This commit adds the limitation to rte_exit() to make things clear.
> 
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>

This patch has had no response in almost two years.
The root cause of the problem is a the assumption in the service library.
That is a bug and should be filed against rte_service, not by having a
caveat in documentation that no one will read anyway.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-30  3:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 14:13 [dpdk-dev] [PATCH] eal: add rte_exit() main lcore limitation description Suanming Mou
2023-06-30  3:37 ` Stephen Hemminger

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).