From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D08F22C18 for ; Mon, 10 Dec 2018 14:12:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2018 05:12:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,338,1539673200"; d="scan'208";a="302556401" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 10 Dec 2018 05:12:46 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 10 Dec 2018 05:12:46 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 10 Dec 2018 05:12:46 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.59]) by shsmsx102.ccr.corp.intel.com ([169.254.2.182]) with mapi id 14.03.0415.000; Mon, 10 Dec 2018 21:12:44 +0800 From: "Zhang, Qi Z" To: "Yan, Zhirun" , "dev@dpdk.org" , "Wang, Haiyue" Thread-Topic: [PATCH v1] net/i40e: avoid invalid operations after reset Thread-Index: AQHUkGIvUzyFvTBruUSKlRwDnG4rqqV37t2w Date: Mon, 10 Dec 2018 13:12:44 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532FC065@SHSMSX103.ccr.corp.intel.com> References: <20181210160446.36825-1-zhirun.yan@intel.com> In-Reply-To: <20181210160446.36825-1-zhirun.yan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmU0Yzk4MjktYjZlMC00ZGYzLTllMDQtMjg3ZjdmYjczM2ZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN2tqc0t4VVNMVDJLZWhOV0Vsc0xTZytQa3RySUxRYWZKM1h3XC94Rjdwd2U1ckhYWEdac3FlQlQ0UzVtMkFiVUUifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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: Mon, 10 Dec 2018 13:12:48 -0000 > -----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 >=20 > if reset but not reinit adminq, some operations in i40evf_dev_close() lik= e > i40evf_dev_promiscuous_disable() and > i40evf_dev_allmulticast_disable() will result in failures. >=20 > Fixes: cae18d2b0fb4 ("net/i40e: add workaround promiscuous disable") >=20 > 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(-) >=20 > 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); >=20 > 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) { I didn't see when vf_reset will be cleared to false? Is it another bug? > + i40evf_dev_promiscuous_disable(dev); > + i40evf_dev_allmulticast_disable(dev); > + i40evf_reset_vf(hw); > + } > - i40evf_reset_vf(hw); > i40e_shutdown_adminq(hw); > i40evf_disable_irq0(hw); > rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev); > -- > 2.17.1