DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rmody@marvell.com>
To: Thomas Monjalon <thomas@monjalon.net>
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: Fri, 25 Sep 2020 19:24:10 +0000	[thread overview]
Message-ID: <BYAPR18MB283899E485FA8A95A5438033B5360@BYAPR18MB2838.namprd18.prod.outlook.com> (raw)
In-Reply-To: <5510907.LnDuOoN5zq@thomas>

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.
If it needs to be part of close function, I can move it there.

>About the title, I would suggest net/bnx2x: release port upon close
>
I'll change the title and resubmit.

Thanks!
-Rasesh


  reply	other threads:[~2020-09-25 19:24 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   ` Rasesh Mody [this message]
2020-09-26 11:40     ` [dpdk-dev] [EXT] " Thomas Monjalon

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=BYAPR18MB283899E485FA8A95A5438033B5360@BYAPR18MB2838.namprd18.prod.outlook.com \
    --to=rmody@marvell.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=ferruh.yigit@intel.com \
    --cc=irusskikh@marvell.com \
    --cc=thomas@monjalon.net \
    /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).