From 7c6e6aef870848cf887b2115d7c13bfcde6f4627 Mon Sep 17 00:00:00 2001 From: Steve Yang Date: Tue, 15 Sep 2020 06:46:22 +0000 Subject: [PATCH] net/ixgbe: fix VF reset HW error handling When start a VF with no initial MAC address assigned by the underlying Host PF driver, just reuse the MAC address assigned when VF is initializing. Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling") Cc: stable@dpdk.org Signed-off-by: Steve Yang Acked-by: Jeff Guo --- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c74467e068..8da963a916 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5320,10 +5320,16 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbe_dev_wait_setup_link_complete(dev, 0); err = hw->mac.ops.reset_hw(hw); - if (err) { + + /** + * In this case, reuses the MAC address assigned by VF + * initialization. + */ + if (err != IXGBE_SUCCESS && err != IXGBE_ERR_INVALID_MAC_ADDR) { PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)", err); return err; } + hw->mac.get_link_status = true; /* negotiate mailbox API version to use with the PF. */ -- 2.20.1