patches for DPDK stable branches
 help / color / mirror / Atom feed
From: chenxux.di@intel.com
To: qabuild@intel.com
Cc: "Di, ChenxuX" <chenxux.di@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [DPDK] net/i40e: fix update PMD close function
Date: Wed, 31 Jul 2019 09:22:19 +0000	[thread overview]
Message-ID: <20190731092219.58754-1-chenxux.di@intel.com> (raw)

From: "Di, ChenxuX" <chenxux.di@intel.com>

For each driver where we add flag RTE_ETH_DEV_CLOSE_REMOVE to
eth_xxx_dev_init() to pass the information to the rte_eth_dev_close()
that it should also release the private port resources.

Fixes: 23ea57a2a0ce ("ethdev: complete closing of port")
Cc: stable@dpdk.org

Signed-off-by: Di ChenxuX <chenxux.di@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..def78047a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1520,6 +1520,12 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
 					&dev->data->mac_addrs[0]);
 
+	/*
+	 * Pass the information to the rte_eth_dev_close() that it should also
+	 * release the private port resources.
+	 */
+	dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+
 	/* Init dcb to sw mode by default */
 	ret = i40e_dcb_init_configure(dev, TRUE);
 	if (ret != I40E_SUCCESS) {
-- 
2.17.1


                 reply	other threads:[~2019-07-31  9:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190731092219.58754-1-chenxux.di@intel.com \
    --to=chenxux.di@intel.com \
    --cc=qabuild@intel.com \
    --cc=stable@dpdk.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).