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 1C21AA04DC; Mon, 19 Oct 2020 11:16:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D8D93E2F5; Mon, 19 Oct 2020 10:54:28 +0200 (CEST) Received: from qq.com (smtpbg465.qq.com [59.36.132.35]) by dpdk.org (Postfix) with ESMTP id 00608CFB1 for ; Mon, 19 Oct 2020 10:53:43 +0200 (CEST) X-QQ-mid: bizesmtp6t1603097620tr0ysjlpg Received: from localhost.localdomain.com (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Mon, 19 Oct 2020 16:53:40 +0800 (CST) X-QQ-SSF: 01400000002000C0C000B00A0000000 X-QQ-FEAT: +YOBnTLWDrGp1F/1b+qtRC0ZPJJ+tgCB9sJ1aGGUqTHH/nZQSvxbk6RJPi0y1 89MT3tvyenRu+rujhswZfvwh/HxXkYFOyHq516j6Vdok65VCIv3bw55bwhfs0yPEM4Y1pwL Wksf27mzrLeZgbJ05eR0vZUm5zMejzzv3yydL0d5XVSn81LX3OX3oICl5HUrFtG3lzgOYFI wBfF4OPhsVF3Z887n83SGEWwDAmKwIXat6EvUmzYsoCB8+qlzsPKcDnddKP7tLE37zrBNLK HLEvHDNwLfxqwIXh4Aqo/99cACVZb/FMZHY6RwTiMNWVu3txzrE7KcWsctJ8hi/cFvV8QoS /XSqbpsDyLiK2PBkzyQA3V2i8Aixg== X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu Date: Mon, 19 Oct 2020 16:54:14 +0800 Message-Id: <20201019085415.82207-58-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20201019085415.82207-1-jiawenwu@trustnetic.com> References: <20201019085415.82207-1-jiawenwu@trustnetic.com> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgweb:qybgweb14 Subject: [dpdk-dev] [PATCH v4 57/58] net/txgbe: change stop operation callback to return int 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" Change txgbe_dev_stop return value from void to int, refer to the changes in main repo. Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 87824b140..aeefb1ed1 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -1602,7 +1602,7 @@ txgbe_dev_start(struct rte_eth_dev *dev) /* * Stop device: disable rx and tx functions to allow for reconfiguring. */ -static void +static int txgbe_dev_stop(struct rte_eth_dev *dev) { struct rte_eth_link link; @@ -1614,7 +1614,7 @@ txgbe_dev_stop(struct rte_eth_dev *dev) int vf; if (hw->adapter_stopped) - return; + return 0; PMD_INIT_FUNC_TRACE(); @@ -1668,6 +1668,9 @@ txgbe_dev_stop(struct rte_eth_dev *dev) wr32m(hw, TXGBE_LEDCTL, 0xFFFFFFFF, TXGBE_LEDCTL_SEL_MASK); hw->adapter_stopped = true; + dev->data->dev_started = 0; + + return 0; } /* @@ -1726,17 +1729,13 @@ txgbe_dev_close(struct rte_eth_dev *dev) txgbe_pf_reset_hw(hw); - txgbe_dev_stop(dev); + ret = txgbe_dev_stop(dev); txgbe_dev_free_queues(dev); /* reprogram the RAR[0] in case user changed it. */ txgbe_set_rar(hw, 0, hw->mac.addr, 0, true); - dev->dev_ops = NULL; - dev->rx_pkt_burst = NULL; - dev->tx_pkt_burst = NULL; - /* Unlock any pending hardware semaphore */ txgbe_swfw_lock_reset(hw); @@ -1768,7 +1767,7 @@ txgbe_dev_close(struct rte_eth_dev *dev) rte_free(dev->data->hash_mac_addrs); dev->data->hash_mac_addrs = NULL; - return 0; + return ret; } /* -- 2.18.4