From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Maayan Kashani <mkashani@nvidia.com>,
dev@dpdk.org, rasland@nvidia.com, stable@dpdk.org,
Anatoly Burakov <anatoly.burakov@intel.com>
Subject: Re: [PATCH] examples/multi_process: fix cleanup on exit
Date: Thu, 17 Jul 2025 21:50:06 +0200 [thread overview]
Message-ID: <2233504.irdbgypaU6@thomas> (raw)
In-Reply-To: <20250709080104.62fb27dc@hermes.local>
09/07/2025 17:01, Stephen Hemminger:
> On Tue, 8 Jul 2025 10:09:54 +0300
> Maayan Kashani <mkashani@nvidia.com> wrote:
>
> > +static void
> > +exit_cleanup(void)
> > +{
> > + unsigned int i;
> > +
> > + RTE_LOG(INFO, APP, "Close ports.\n");
> > + for (i = 0; i < num_ports; i++) {
> > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> > + if (rte_eth_dev_stop(ports[i]))
> > + rte_exit(EXIT_FAILURE, "Error stopping ports\n");
> > + if (rte_eth_dev_close(ports[i]))
> > + rte_exit(EXIT_FAILURE, "Error closing ports\n");
> > + }
> > + }
>
> Could the ethdev cleanup be integrated into eal_cleanup() so applications
> don't have to care?
It would be a layer violation.
We could have a list of callbacks maybe.
prev parent reply other threads:[~2025-07-17 19:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 7:09 Maayan Kashani
2025-07-09 13:30 ` Burakov, Anatoly
2025-07-09 14:40 ` Thomas Monjalon
2025-07-09 15:01 ` Stephen Hemminger
2025-07-17 19:50 ` Thomas Monjalon [this message]
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=2233504.irdbgypaU6@thomas \
--to=thomas@monjalon.net \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=mkashani@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.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).