From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BB809AACC for ; Tue, 17 Apr 2018 05:17:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2018 20:17:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,461,1517904000"; d="scan'208";a="217126286" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 16 Apr 2018 20:17:25 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Apr 2018 20:17:24 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.6]) with mapi id 14.03.0319.002; Tue, 17 Apr 2018 11:17:23 +0800 From: "Xu, Rosen" To: "Zhang, Helin" , "Zhang, Qi Z" , "Xing, Beilei" , "Hu, Xuekun" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] drivers/net/i40e/i40e_ethdev_vf.c: fix missing promiscuous disable at device stop Thread-Index: AQHTvEH3lVV1xxB1iUWBysqXgl7OE6PSY/mAgBRbxSCAHbqbcA== Date: Tue, 17 Apr 2018 03:17:23 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D739F6A5FC@SHSMSX104.ccr.corp.intel.com> References: <1521107140-68349-1-git-send-email-rosen.xu@intel.com> <039ED4275CED7440929022BC67E706115316E52F@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzMwY2JiNWEtMzY5OC00ZDRmLTg1NDUtMzc4ZTE4ZTI3YzE3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InBCTFlLQ3l5SmFEZno5UldRcit2a0o5Q3FGMmpaekZsVHc1RjgwdzFNMUU9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 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 v2] drivers/net/i40e/i40e_ethdev_vf.c: fix missing promiscuous disable at device stop 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, 17 Apr 2018 03:17:28 -0000 Hi Helin, > -----Original Message----- > From: Zhang, Helin > Sent: Thursday, March 29, 2018 13:11 > To: Zhang, Qi Z ; Xu, Rosen ; > Xing, Beilei > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2] drivers/net/i40e/i40e_ethdev_vf.c: fix > missing promiscuous disable at device stop >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z > > Sent: Friday, March 16, 2018 2:25 PM > > To: Xu, Rosen; Xing, Beilei > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v2] drivers/net/i40e/i40e_ethdev_vf.c: > > fix missing promiscuous disable at device stop > > > > Hi Rosen: > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rosen Xu > > > Sent: Thursday, March 15, 2018 5:46 PM > > > To: Xing, Beilei > > > Cc: dev@dpdk.org > > > Subject: [dpdk-dev] [PATCH v2] drivers/net/i40e/i40e_ethdev_vf.c: > > > fix missing promiscuous disable at device stop > > > > > > In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit > > > doesn't disable promiscuous mode, this will cause vlan filter set by > > > Kernel Driver will not take effect. > > > > > > This patch will fix it, add promiscuous disable at device stop. > > > > > > Signed-off-by: Rosen Xu > > > --- > > > drivers/net/i40e/i40e_ethdev_vf.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > > b/drivers/net/i40e/i40e_ethdev_vf.c > > > index fd003fe..f395b02 100644 > > > --- a/drivers/net/i40e/i40e_ethdev_vf.c > > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > > @@ -2051,6 +2051,8 @@ static int eth_i40evf_pci_remove(struct > > > rte_pci_device *pci_dev) > > > > > > if (hw->adapter_stopped =3D=3D 1) > > > return; > > > + i40evf_dev_promiscuous_disable(dev); > > > + i40evf_dev_allmulticast_disable(dev); > > > > Device's promiscuous mode is not expected to be changed in a > > dev_start/dev_stop cycle Application need to call > > rte_eth_promiscuous_disable and i40evf_dev_allmulticast_disable to > > change it explicitly. > > > > Regards > > Qi This modification comes from some customers, they don't want to take this w= ork in their application. > Basically I'd reject your patch, based on the comments Qi made above. >=20 > /Helin I have aligned with Jingjing and Qi, their proposal is to take this modific= ation in vf Init, but after I have checked kernel driver, I find if we don't disable promiscuous mode before a= ny call i40evf_reset_vf(), i40evf_reset_vf() will cause open promiscuous mode. So we only take this mo= dification in dev_disable. > > > > > i40evf_stop_queues(dev); > > > i40evf_disable_queues_intr(dev); > > > i40e_dev_clear_queues(dev); > > > -- > > > 1.8.3.1