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 A9B5CA04F0; Mon, 13 Jan 2020 05:20:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CEE281D5D3; Mon, 13 Jan 2020 05:19:22 +0100 (CET) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id A5DD01D509 for ; Mon, 13 Jan 2020 05:19:15 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 695011BDCF4; Sun, 12 Jan 2020 20:19:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 695011BDCF4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1578889155; bh=ZEFmApvr5Tn6UtKOXeHyhSWqSi0WpflWwDYHJrLgPVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SLFBSWmSUvQM7j5ZSD0h+Htfc7k5EKRvdbEzTa6t/tL4PkK0ncrZg+50fUyU9xsaZ +ZNCP/vjbp6nWllVUb1meiyZdMyhUn0LwxnKd2g27M2vvqGoZulEhAR89Rg6Trr7UX jkmZld5tsk0rHGbJuOEg1jVW/rBfAkZefzICfdrk= From: Kalesh A P To: dev@dpdk.org, ajit.khaparde@broadcom.com Cc: ferruh.yigit@intel.com Date: Mon, 13 Jan 2020 10:06:08 +0530 Message-Id: <20200113043609.27363-10-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20200113043609.27363-1-kalesh-anakkur.purayil@broadcom.com> References: <20200113043609.27363-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 09/10] net/bnxt: release port upon close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Somnath Kotur Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources for the port can be freed by rte_eth_dev_close(). Signed-off-by: Somnath Kotur Reviewed-by: Kalesh Anakkur Purayil Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index ba3f0a7..8acfade 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4856,6 +4856,11 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) if (rc) goto error_free; + /* Pass the information to the rte_eth_dev_close() that it should also + * release the private port resources. + */ + eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE; + PMD_DRV_LOG(INFO, DRV_MODULE_NAME "found at mem %" PRIX64 ", node addr %pM\n", pci_dev->mem_resource[0].phys_addr, -- 2.10.1