From: Gabor LENCSE <lencse@hit.bme.hu>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org
Subject: Re: rte_exit() does not terminate the program -- is it a bug or a new feature?
Date: Sun, 17 Sep 2023 21:37:30 +0200 [thread overview]
Message-ID: <930f2885-caec-7297-65f7-0959dd6d550c@hit.bme.hu> (raw)
In-Reply-To: <20230915143305.0ac313c6@hermes.local>
[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]
Dear Stephen,
Thank you very much for your answer. Please see my answers inline.
> Not sure what the tx and rx polling loops look like in your application.
In short: they surely finish.
In more details:
- The receivers finish due to timeout. In my case the receiving threads
finished OK. (Their CPU cores became idle.)
- The sender threads check if sending happened within timeout time only
AFTER all test frames were sent, that is, the sending loop finished. (It
is done so to spare 1 branch instruction in the innermost sending loop.)
So the sending loop is already finished when the rte_exit() is called.
*My problem is that calling the rte_exit() function does not terminate
the application.*
> But they need to have some way of forcing exit, and you need to set that
> flag before calling rte_exit().
>
> See l2fwd and force_quit flag for an example.
I have looked into its source code. I understand that it sets the
"force_quit" flag when it receives a SIGINT or SIGTERM signal, and the
nonzero value of the "force_quit" flag causes to finish the while cycle
of the "l2fwd_main_loop(void)".
However, l2fwd also uses the "rte_exit()" function to terminate the
program. The only difference is that it calls the "rte_exit()" function
from the main program, and I do so in a thread started by the
"rte_eal_remote_launch()" function.
Is there any constraint for usage the "rte_eal_remote_launch()"
function? (E.g., it may be called only from the main thread? I did not
see anything like that int the documentation.)
Best regards,
Gábor
[-- Attachment #2: Type: text/html, Size: 2291 bytes --]
next prev parent reply other threads:[~2023-09-17 19:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 8:24 Gabor LENCSE
2023-09-15 15:06 ` Stephen Hemminger
2023-09-15 18:28 ` Gabor LENCSE
2023-09-15 21:33 ` Stephen Hemminger
2023-09-17 19:37 ` Gabor LENCSE [this message]
2023-09-17 21:27 ` Stephen Hemminger
2023-09-18 18:23 ` Gabor LENCSE
2023-09-18 18:49 ` 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=930f2885-caec-7297-65f7-0959dd6d550c@hit.bme.hu \
--to=lencse@hit.bme.hu \
--cc=stephen@networkplumber.org \
--cc=users@dpdk.org \
/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 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).