From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 56FD52C2B for ; Tue, 11 Dec 2018 06:31:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2018 21:31:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,341,1539673200"; d="scan'208";a="301110664" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 10 Dec 2018 21:31:57 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 10 Dec 2018 21:31:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.201]) by shsmsx102.ccr.corp.intel.com ([169.254.2.182]) with mapi id 14.03.0415.000; Tue, 11 Dec 2018 13:31:55 +0800 From: "Yan, Zhirun" To: "Zhang, Qi Z" , "dev@dpdk.org" , "Wang, Haiyue" Thread-Topic: [PATCH v1] net/i40e: avoid invalid operations after reset Thread-Index: AQHUkGI0rzCO8+C0R0aIfyh8DE4hS6V3bTIAgAGWBdA= Date: Tue, 11 Dec 2018 05:31:54 +0000 Message-ID: <2F9759EBFF61914290A3BA61BDBE2C860B9D4540@SHSMSX101.ccr.corp.intel.com> References: <20181210160446.36825-1-zhirun.yan@intel.com> <039ED4275CED7440929022BC67E70611532FC065@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E70611532FC065@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmU0Yzk4MjktYjZlMC00ZGYzLTllMDQtMjg3ZjdmYjczM2ZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN2tqc0t4VVNMVDJLZWhOV0Vsc0xTZytQa3RySUxRYWZKM1h3XC94Rjdwd2U1ckhYWEdac3FlQlQ0UzVtMkFiVUUifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1] net/i40e: avoid invalid operations after reset 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: , X-List-Received-Date: Tue, 11 Dec 2018 05:31:58 -0000 > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, December 10, 2018 9:13 PM > To: Yan, Zhirun ; dev@dpdk.org; Wang, Haiyue > > Subject: RE: [PATCH v1] net/i40e: avoid invalid operations after reset >=20 >=20 >=20 > > -----Original Message----- > > From: Yan, Zhirun > > Sent: Tuesday, December 11, 2018 12:05 AM > > To: dev@dpdk.org; Wang, Haiyue ; Zhang, Qi Z > > > > Cc: Yan, Zhirun > > Subject: [PATCH v1] net/i40e: avoid invalid operations after reset > > > > if reset but not reinit adminq, some operations in i40evf_dev_close() > > like > > i40evf_dev_promiscuous_disable() and > > i40evf_dev_allmulticast_disable() will result in failures. > > > > Fixes: cae18d2b0fb4 ("net/i40e: add workaround promiscuous disable") > > > > Signed-off-by: Zhirun Yan > > Signed-off-by: Haiyue Wang > > --- > > drivers/net/i40e/i40e_ethdev_vf.c | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > b/drivers/net/i40e/i40e_ethdev_vf.c > > index ae55b9b18..a1f4a729f 100644 > > --- a/drivers/net/i40e/i40e_ethdev_vf.c > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > @@ -2245,6 +2245,7 @@ static void > > i40evf_dev_close(struct rte_eth_dev *dev) { > > struct i40e_hw *hw =3D > > I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); > > + struct i40e_vf *vf =3D > > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > > > > i40evf_dev_stop(dev); > > i40e_dev_free_queues(dev); > > @@ -2253,10 +2254,12 @@ i40evf_dev_close(struct rte_eth_dev *dev) > > * it is a workaround solution when work with kernel driver > > * and it is not the normal way > > */ > > - i40evf_dev_promiscuous_disable(dev); > > - i40evf_dev_allmulticast_disable(dev); > > + if (!vf->vf_reset) { >=20 > I didn't see when vf_reset will be cleared to false? Is it another bug? >=20 After reset VF, vf->vf_reset will be cleared to false after calling i40evf_= request_queues(). This patch is used to fix request_queues. >=20 > > + i40evf_dev_promiscuous_disable(dev); > > + i40evf_dev_allmulticast_disable(dev); > > + i40evf_reset_vf(hw); > > + } >=20 > > - i40evf_reset_vf(hw); > > i40e_shutdown_adminq(hw); > > i40evf_disable_irq0(hw); > > rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev); > > -- > > 2.17.1