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 00597A3168 for ; Thu, 17 Oct 2019 08:35:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 657361E550; Thu, 17 Oct 2019 08:35:03 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 062521E54C for ; Thu, 17 Oct 2019 08:35:00 +0200 (CEST) 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/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 23:34:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,306,1566889200"; d="scan'208";a="279773258" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 16 Oct 2019 23:34:59 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 16 Oct 2019 23:34:59 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) 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; Wed, 16 Oct 2019 23:34:58 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 23:34:58 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX151.ccr.corp.intel.com ([10.239.6.50]) with mapi id 14.03.0439.000; Thu, 17 Oct 2019 14:34:56 +0800 From: "Xing, Beilei" To: Eelco Chaudron , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: force promiscuous state after VF reset Thread-Index: AQHVbStC/qTIPpE/OUabL5o8tg/DbqdbJxmAgANnp6A= Date: Thu, 17 Oct 2019 06:34:55 +0000 Message-ID: <94479800C636CB44BD422CB454846E013CE63719@SHSMSX101.ccr.corp.intel.com> References: <675a204e3f5630d66cfa79b933da25a6c9227069.1568705792.git.echaudro@redhat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] net/i40e: force promiscuous state after VF 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Eelco Chaudron [mailto:echaudro@redhat.com] > Sent: Tuesday, October 15, 2019 6:32 PM > To: Xing, Beilei ; Zhang, Qi Z > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/i40e: force promiscuous state after V= F > reset >=20 > Any update on this patch? >=20 > Thanks, >=20 > Eelco >=20 >=20 > On 17 Sep 2019, at 9:40, Eelco Chaudron wrote: >=20 > > Even though the device reset is successful, disabling promiscuous mode > > might not always succeed, causing enabling it after reset to fail. > > This would happen when the kernel driver requires a reset of the VF. > > > > This patch resets the internal state, so next time promiscuous mode is > > configured it will be enabled. > > > > Signed-off-by: Eelco Chaudron > > --- > > drivers/net/i40e/i40e_ethdev_vf.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > b/drivers/net/i40e/i40e_ethdev_vf.c > > index 551f6fa..e0f99a4 100644 > > --- a/drivers/net/i40e/i40e_ethdev_vf.c > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > @@ -2276,11 +2276,21 @@ static int eth_i40evf_pci_remove(struct > > rte_pci_device *pci_dev) i40evf_dev_reset(struct rte_eth_dev *dev) { > > int ret; > > + struct i40e_vf *vf =3D > > I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); > > > > ret =3D i40evf_dev_uninit(dev); > > if (ret) > > return ret; > > > > + /* > > + * Even though the device reset is successful disabling promiscuous > > + * mode might not always succeed, causing enabling it after reset to I think we need to root cause why fail to disable promiscuous mode and try = to fix it first. Thanks. Beilei > > + * fail. This would happen when the kernel driver requires a reset > > + * of the VF. > > + */ > > + if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) > > + vf->promisc_unicast_enabled =3D FALSE; > > + > > ret =3D i40evf_dev_init(dev); > > > > return ret; > > -- > > 1.8.3.1