DPDK patches and discussions
 help / color / mirror / Atom feed
From: SteveX Yang <stevex.yang@intel.com>
To: dev@dpdk.org
Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com,
	SteveX Yang <stevex.yang@intel.com>
Subject: [dpdk-dev] [PATCH v3] net/ixgbe: fix vf reset hw error handling
Date: Tue, 15 Sep 2020 06:46:22 +0000	[thread overview]
Message-ID: <20200915064622.20256-1-stevex.yang@intel.com> (raw)
In-Reply-To: <20200908031705.14496-1-stevex.yang@intel.com>

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")

Signed-off-by: SteveX Yang <stevex.yang@intel.com>
---
v3:
 * update commit and inline comment
v2:
 * update comment
---
 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 d9582473a..d68f090fd 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5322,10 +5322,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.17.1


  parent reply	other threads:[~2020-09-15  6:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02  0:44 [dpdk-dev] [PATCH] " SteveX Yang
2020-09-03  2:24 ` Yang, Qiming
2020-09-08  3:17 ` [dpdk-dev] [PATCH v2] " SteveX Yang
2020-09-11  6:24   ` Guo, Jia
2020-09-15  6:46   ` SteveX Yang [this message]
2020-09-23  6:16     ` [dpdk-dev] [PATCH v3] " Guo, Jia
2020-09-23 11:46       ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200915064622.20256-1-stevex.yang@intel.com \
    --to=stevex.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jia.guo@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=wei.zhao1@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).