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 81D4CA04B1; Wed, 23 Sep 2020 08:16:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF3EC1DBA7; Wed, 23 Sep 2020 08:16:49 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D01BF1DBA7 for ; Wed, 23 Sep 2020 08:16:47 +0200 (CEST) IronPort-SDR: qk6OUULaUwVFB7gUHAMfCmi4Vrl8YEcli94O5aOY0Ep7sskG6ZBTA3J42Y4VbFSQXKeWlJoG0F lM5VgdaVAKfw== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="222388992" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="222388992" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 23:16:46 -0700 IronPort-SDR: gBBs9QmE6oELBvWF6lDtgryvLcKj2wzc7foUqFOc15+tDgo/mFsGAgjQXlMJU5A3oxKUk7mndQ 5wmvcPJ776JQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="342319994" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2020 23:16:46 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 22 Sep 2020 23:16:45 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Sep 2020 14:16:43 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Wed, 23 Sep 2020 14:16:43 +0800 From: "Guo, Jia" To: "Yang, SteveX" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Yang, Qiming" Thread-Topic: [PATCH v3] net/ixgbe: fix vf reset hw error handling Thread-Index: AQHWiywYUN0aNCn5/kWJUZvtc7Bin6l1y8zg Date: Wed, 23 Sep 2020 06:16:43 +0000 Message-ID: <3c510ac1f7814015b25470e1009731d8@intel.com> References: <20200908031705.14496-1-stevex.yang@intel.com> <20200915064622.20256-1-stevex.yang@intel.com> In-Reply-To: <20200915064622.20256-1-stevex.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Acked-by: Jeff Guo > -----Original Message----- > From: Yang, SteveX > Sent: Tuesday, September 15, 2020 2:46 PM > To: dev@dpdk.org > Cc: Zhao1, Wei ; Guo, Jia ; Yang, > Qiming ; Yang, SteveX > Subject: [PATCH v3] net/ixgbe: fix vf reset hw error handling >=20 > When start a VF with no initial MAC address assigned by the underlying Ho= st > PF driver, just reuse the MAC address assigned when VF is initializing. >=20 > Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling") >=20 > 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(-) >=20 > 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); >=20 > err =3D hw->mac.ops.reset_hw(hw); > - if (err) { > + > + /** > + * In this case, reuses the MAC address assigned by VF > + * initialization. > + */ > + if (err !=3D IXGBE_SUCCESS && err !=3D > IXGBE_ERR_INVALID_MAC_ADDR) { > PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)", > err); > return err; > } > + > hw->mac.get_link_status =3D true; >=20 > /* negotiate mailbox API version to use with the PF. */ > -- > 2.17.1