From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 603A0A10DA for ; Wed, 31 Jul 2019 11:31:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4845B1C121; Wed, 31 Jul 2019 11:31:07 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 550E61C121 for ; Wed, 31 Jul 2019 11:31:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2019 02:31:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,329,1559545200"; d="scan'208";a="191200628" Received: from intel.sh.intel.com ([10.239.255.144]) by fmsmga001.fm.intel.com with ESMTP; 31 Jul 2019 02:31:04 -0700 From: chenxux.di@intel.com To: qabuild@intel.com Cc: "Di, ChenxuX" , stable@dpdk.org Date: Wed, 31 Jul 2019 09:22:19 +0000 Message-Id: <20190731092219.58754-1-chenxux.di@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [DPDK] net/i40e: fix update PMD close function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: "Di, ChenxuX" 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 Acked-by: Qi Zhang --- 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