From: Thomas Monjalon <thomas@monjalon.net>
To: Rasesh Mody <rmody@marvell.com>
Cc: "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Igor Russkikh <irusskikh@marvell.com>,
Devendra Singh Rawat <dsinghrawat@marvell.com>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] net/bnx2x: enhance old ethdev close behavior
Date: Sat, 26 Sep 2020 13:40:53 +0200 [thread overview]
Message-ID: <2608981.eo9qpkfZKq@thomas> (raw)
In-Reply-To: <BYAPR18MB283899E485FA8A95A5438033B5360@BYAPR18MB2838.namprd18.prod.outlook.com>
25/09/2020 21:24, Rasesh Mody:
> Hi Thomas,
>
> >From: Thomas Monjalon <thomas@monjalon.net>
> >Sent: Friday, September 25, 2020 12:11 AM
> >
> >25/09/2020 06:17, Rasesh Mody:
> >> Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources
> >> for the port can be freed by rte_eth_dev_close(). With this change the
> >> private port resources are released in the .dev_close callback.
> >>
> >> Signed-off-by: Rasesh Mody <rmody@marvell.com>
> >> ---
> >> static int eth_bnx2x_dev_uninit(struct rte_eth_dev *eth_dev) {
> >> - /* mac_addrs must not be freed alone because part of dev_private */
> >> - eth_dev->data->mac_addrs = NULL;
> >> + struct bnx2x_softc *sc = eth_dev->data->dev_private;
> >> +
> >> + PMD_INIT_FUNC_TRACE(sc);
> >> +
> >> + /* only uninitialize in the primary process */
> >> + if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> >> + return 0;
> >> +
> >> + bnx2x_dev_close(eth_dev);
> >
> >The check for primary process should be in the close function.
> >
> PMDs check for primary process as part of PCI probe, hence it was put in as part of PCI remove. I also observed other PMDs implementing a similar scheme.
Yes I am reviewing other PMDs to fix the same.
> If it needs to be part of close function, I can move it there.
Yes please.
> >About the title, I would suggest net/bnx2x: release port upon close
> >
> I'll change the title and resubmit.
Thanks
prev parent reply other threads:[~2020-09-26 11:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 4:17 [dpdk-dev] " Rasesh Mody
2020-09-25 4:17 ` [dpdk-dev] [PATCH] net/qede: " Rasesh Mody
2020-09-25 7:11 ` [dpdk-dev] [PATCH] net/bnx2x: " Thomas Monjalon
2020-09-25 19:24 ` [dpdk-dev] [EXT] " Rasesh Mody
2020-09-26 11:40 ` 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=2608981.eo9qpkfZKq@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=dsinghrawat@marvell.com \
--cc=ferruh.yigit@intel.com \
--cc=irusskikh@marvell.com \
--cc=rmody@marvell.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).