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 78A20A04C7; Tue, 15 Sep 2020 08:47:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 870681BFC5; Tue, 15 Sep 2020 08:47:37 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DA23C1BFC4 for ; Tue, 15 Sep 2020 08:47:35 +0200 (CEST) IronPort-SDR: YDNo8wrDWfb8WmTLaiadCAccd4ZWaRlPmCLmVG4dP5hKpwDVtcxzKxm50ejWeWLZqKxyOesCU6 mhbyyiu9tQUQ== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="146898173" X-IronPort-AV: E=Sophos;i="5.76,428,1592895600"; d="scan'208";a="146898173" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 23:47:34 -0700 IronPort-SDR: 9t4WH7OL8hqX99lArBrdfpKoE+760eV3XT8gMzhSJxKmfZ5oa/0q7f6wxdQ540fhryVrOTgt6c aEKTh8LJz4Tg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,428,1592895600"; d="scan'208";a="379638714" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by orsmga001.jf.intel.com with ESMTP; 14 Sep 2020 23:47:32 -0700 From: SteveX Yang To: dev@dpdk.org Cc: wei.zhao1@intel.com, jia.guo@intel.com, qiming.yang@intel.com, SteveX Yang Date: Tue, 15 Sep 2020 06:46:22 +0000 Message-Id: <20200915064622.20256-1-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200908031705.14496-1-stevex.yang@intel.com> References: <20200908031705.14496-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v3] net/ixgbe: fix vf reset hw error handling 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" 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 --- 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