From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: [PATCH 1/5] ethdev: free a port by a dedicated API Date: Tue, 28 Nov 2017 11:57:57 +0000 Message-ID: <1511870281-15282-2-git-send-email-matan@mellanox.com> References: <1511870281-15282-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org To: Thomas Monjalon , Gaetan Rivet , Jingjing Wu Return-path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30086.outbound.protection.outlook.com [40.107.3.86]) by dpdk.org (Postfix) with ESMTP id B3D563230 for ; Tue, 28 Nov 2017 12:58:27 +0100 (CET) In-Reply-To: <1511870281-15282-1-git-send-email-matan@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use a dedicated API to free port instead of changing its state directly. Signed-off-by: Matan Azrad --- lib/librte_ether/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 318af28..2d754d9 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -437,7 +437,7 @@ struct rte_eth_dev * if (ret < 0) goto err; - rte_eth_devices[port_id].state = RTE_ETH_DEV_UNUSED; + rte_eth_dev_release_port(&rte_eth_devices[port_id]); return 0; err: -- 1.8.3.1