From: Jerin Jacob <jerinjacobk@gmail.com>
To: "Varghese, Vipin" <vipin.varghese@intel.com>
Cc: Muhammad Bilal <m.bilal@emumba.com>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
"jgrajcia@cisco.com" <jgrajcia@cisco.com>
Subject: Re: [dpdk-dev] [PATCH] examples/l2fwd/main.c: free resources in case of error
Date: Tue, 12 May 2020 11:14:42 +0530 [thread overview]
Message-ID: <CALBAE1MvoD0NBwVdb9aceSvfdTEa7uu9Y2qpwhvLjkhMYM-OwA@mail.gmail.com> (raw)
In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4D2C85@BGSMSX101.gar.corp.intel.com>
On Tue, May 12, 2020 at 10:20 AM Varghese, Vipin
<vipin.varghese@intel.com> wrote:
>
> snipped
> > Subject: [PATCH] examples/l2fwd/main.c: free resources in case of error
> >
> > Bugzilla ID: 437
> > Cc: dev@dpdk.org
> > Cc: stable@dpdk.org
> > Cc: bruce.richardson@intel.com
> > Cc: vipin.varghese@intel.com
> > Cc: jgrajcia@cisco.com
> > Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
> > ---
> > examples/l2fwd/main.c | 72 ++++++++++++++++++++++++++++++++++---------
> > 1 file changed, 57 insertions(+), 15 deletions(-)
> >
> > diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index
> > 88ddfe589..dbaa457e2 100644
> > --- a/examples/l2fwd/main.c
> > +++ b/examples/l2fwd/main.c
> > @@ -517,6 +517,17 @@ signal_handler(int signum)
> > }
> > }
> >
> > +static void
> > +stop_and_close_eth_dev(uint16_t portid) {
> > + RTE_ETH_FOREACH_DEV(portid) {
> > + printf("Closing port %d...", portid);
> > + rte_eth_dev_stop(portid);
> > + rte_eth_dev_close(portid);
> > + printf(" Done\n");
> > + }
> > +}
> > +
> If the solution is to cleanup in application, then all application needs to do cleanup. Hence `+1` for updating this to all examples in DPDK.
When updating the examples, Add the rte_eal_cleanup() as well(it is
the counterpart of rte_eal_init())
>
next prev parent reply other threads:[~2020-05-12 5:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 11:28 Muhammad Bilal
2020-05-12 4:49 ` Varghese, Vipin
2020-05-12 5:44 ` Jerin Jacob [this message]
2020-05-12 13:56 ` [dpdk-dev] [PATCH v2] examples/l2fwd: " Muhammad Bilal
2020-06-05 12:01 ` Muhammad Bilal
2023-06-12 21:18 ` 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=CALBAE1MvoD0NBwVdb9aceSvfdTEa7uu9Y2qpwhvLjkhMYM-OwA@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jgrajcia@cisco.com \
--cc=m.bilal@emumba.com \
--cc=stable@dpdk.org \
--cc=vipin.varghese@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 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).