DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Rasesh Mody <rmody@marvell.com>
Cc: ferruh.yigit@intel.com, dev@dpdk.org, irusskikh@marvell.com,
	dsinghrawat@marvell.com
Subject: Re: [dpdk-dev] [PATCH] net/bnx2x: enhance old ethdev close behavior
Date: Fri, 25 Sep 2020 09:11:19 +0200	[thread overview]
Message-ID: <5510907.LnDuOoN5zq@thomas> (raw)
In-Reply-To: <20200925041744.17688-1-rmody@marvell.com>

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.

About the title, I would suggest net/bnx2x: release port upon close



  parent reply	other threads:[~2020-09-25  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  4:17 Rasesh Mody
2020-09-25  4:17 ` [dpdk-dev] [PATCH] net/qede: " Rasesh Mody
2020-09-25  7:11 ` Thomas Monjalon [this message]
2020-09-25 19:24   ` [dpdk-dev] [EXT] Re: [PATCH] net/bnx2x: " Rasesh Mody
2020-09-26 11:40     ` 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=5510907.LnDuOoN5zq@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).