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 BAB09A04B7; Fri, 11 Sep 2020 08:24:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 17A7A1BF90; Fri, 11 Sep 2020 08:24:25 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id CBE5B255 for ; Fri, 11 Sep 2020 08:24:23 +0200 (CEST) IronPort-SDR: SMP0zIU/t0TzDCW5l1b7KAU+4t5dmxCss1kAFf7FC4k2SMOeNpp5aDQzV4CPALYWRNdAAUXAxv fP8W/eFx1iwQ== X-IronPort-AV: E=McAfee;i="6000,8403,9740"; a="157986269" X-IronPort-AV: E=Sophos;i="5.76,414,1592895600"; d="scan'208";a="157986269" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 23:24:22 -0700 IronPort-SDR: pzT4o4QVjkXkcwAtL5tFdQVWz+0Z8av20GQtYV+BvwTtBnWZFOWG7iU5BXlzQoawpz1EDTl/oO lVG4D1TBC3KA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,414,1592895600"; d="scan'208";a="334419084" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga008.jf.intel.com with ESMTP; 10 Sep 2020 23:24:22 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 10 Sep 2020 23:24:21 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 11 Sep 2020 14:24:19 +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; Fri, 11 Sep 2020 14:24:19 +0800 From: "Guo, Jia" To: "Yang, SteveX" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Yang, Qiming" Thread-Topic: [PATCH v2] net/ixgbe: fix vf reset hw error handling Thread-Index: AQHWhY723qsM83eDckyajQ0cBDbv76li80zw Date: Fri, 11 Sep 2020 06:24:19 +0000 Message-ID: <8dbad8cb0109410e89a9c17edd2df459@intel.com> References: <20200902004425.33423-1-stevex.yang@intel.com> <20200908031705.14496-1-stevex.yang@intel.com> In-Reply-To: <20200908031705.14496-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 v2] 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" Hi, steve > -----Original Message----- > From: Yang, SteveX > Sent: Tuesday, September 8, 2020 11:17 AM > To: dev@dpdk.org > Cc: Zhao1, Wei ; Guo, Jia ; Yang, > Qiming ; Yang, SteveX > Subject: [PATCH v2] net/ixgbe: fix vf reset hw error handling >=20 > The PF control message will interrupt the assigning MAC address for VF wh= en > PF physical link down, and the VF reset operation returns the > IXGBE_ERR_INVALID_MAC_ADDR. In this case, reuse the MAC address when > device initialization insteads of waiting PF reassign. >=20 This commit log is not very clear and readable. I think as qiming said befo= re, such as below should be enough,=20 "When start a VF with no initial MAC address assigned by the underlying Hos= t PF driver, just reuse the MAC address assigned when VF is initializing." > Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling") >=20 > Signed-off-by: SteveX Yang > --- > v2: > update comment. > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index fd0cb9b0e..c2fa59c73 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -5326,10 +5326,17 @@ 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) { > + > + /* Please use /** at the first line. > + * The VF reset operation returns the > IXGBE_ERR_INVALID_MAC_ADDR when > + * the underlying PF driver has not assigned a MAC address to the VF. > + * In this case, reuses the MAC address from eth_ixgbevf_dev_init(). > + */ "In this case, reuses the MAC address assigned by VF initialization.", plea= se ref. > + 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