From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id D3E1AF610; Wed, 11 Jan 2017 18:04:07 +0100 (CET) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 82E3A23D3F; Wed, 11 Jan 2017 18:04:03 +0100 (CET) From: Olivier Matz To: dev@dpdk.org, helin.zhang@intel.com, konstantin.ananyev@intel.com Cc: Guo Fengtian , stable@dpdk.org, David Marchand Date: Wed, 11 Jan 2017 17:52:04 +0100 Message-Id: <1484153524-19337-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.8.1 Subject: [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when stopping port 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: , X-List-Received-Date: Wed, 11 Jan 2017 17:04:08 -0000 From: Guo Fengtian When PF triggers a reset, VF port must acknowledge it by calling ixgbe_reset_hw(). Before this patch, the port link status, speed and duplex are invalid (all set to 0). The patch move the call to ixgbe_reset_hw() from ixgbevf_dev_close() to ixgbevf_dev_stop(), so that after a port restart on the VM, the link status is properly marked down, with correct speed and duplex. Fixes: f0160874c041 ("ixgbe: various updates") CC: stable@dpdk.org Signed-off-by: Guo Fengtian Signed-off-by: David Marchand Signed-off-by: Olivier Matz --- Hi, The use case for this problem was described some time ago, see: http://dpdk.org/ml/archives/dev/2015-December/030067.html It is also part of 2.2 release note: http://dpdk.org/browse/dpdk/tree/doc/guides/rel_notes/release_2_2.rst#n471 Regards, Olivier drivers/net/ixgbe/ixgbe_ethdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b7ddd4f..2d8641a 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4268,6 +4268,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); ixgbevf_intr_disable(hw); + ixgbe_reset_hw(hw); hw->adapter_stopped = 1; ixgbe_stop_adapter(hw); @@ -4294,12 +4295,8 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) static void ixgbevf_dev_close(struct rte_eth_dev *dev) { - struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - PMD_INIT_FUNC_TRACE(); - ixgbe_reset_hw(hw); - ixgbevf_dev_stop(dev); ixgbe_dev_free_queues(dev); -- 2.8.1