From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D277756A1 for ; Mon, 14 Dec 2015 20:57:13 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 14 Dec 2015 11:57:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,428,1444719600"; d="scan'208";a="873475676" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga002.fm.intel.com with ESMTP; 14 Dec 2015 11:57:12 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.203]) by IRSMSX104.ger.corp.intel.com ([169.254.5.138]) with mapi id 14.03.0248.002; Mon, 14 Dec 2015 19:57:11 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger Thread-Topic: [PATCH] ixgbe: Discard SRIOV transparent vlan packet headers. Thread-Index: AQHRNDVIPc2v9xXs5Ua8nTZmK+JUAZ7K2GuwgAAJfACAAAQKkA== Date: Mon, 14 Dec 2015 19:57:10 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836AD3A5C@irsmsx105.ger.corp.intel.com> References: <1449853163-25673-1-git-send-email-stephen@networkplumber.org> <2601191342CEEE43887BDE71AB97725836AD3A0B@irsmsx105.ger.corp.intel.com> <20151214112516.35bbc1f8@xeon-e3> In-Reply-To: <20151214112516.35bbc1f8@xeon-e3> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] ixgbe: Discard SRIOV transparent vlan packet headers. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 19:57:14 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Monday, December 14, 2015 7:25 PM > To: Ananyev, Konstantin > Cc: Zhang, Helin; dev@dpdk.org; Tom Kiely > Subject: Re: [PATCH] ixgbe: Discard SRIOV transparent vlan packet headers= . >=20 > On Mon, 14 Dec 2015 19:12:26 +0000 > "Ananyev, Konstantin" wrote: >=20 > > > > > > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > > Sent: Friday, December 11, 2015 4:59 PM > > > To: Zhang, Helin; Ananyev, Konstantin > > > Cc: dev@dpdk.org; Tom Kiely; Stephen Hemminger > > > Subject: [PATCH] ixgbe: Discard SRIOV transparent vlan packet headers= . > > > > > > From: Tom Kiely > > > > > > SRIOV VFs support "transparent" vlans. Traffic from/to a VM > > > associated with a VF is tagged/untagged with the specified > > > vlan in a manner intended to be totally transparent to the VM. > > > > > > The vlan is specified by "ip link set vf vlan ". > > > The VM is not configured for any vlan on the VF and the VM > > > should never see these transparent vlan headers for that reason. > > > > > > However, in practice these vlan headers are being received by > > > the VM which discards the packets as that vlan is unknown to it. > > > The Linux kernel explicitly discards such vlan headers but DPDK > > > does not. > > > This patch mirrors the kernel behaviour for SRIOV VFs only > > > > > > I have few concerns about that approach: > > > > 1. I don't think vlan_tci info should *always* be stripped by vf RX rou= tine. > > There could be configurations when that information might be needed by = upper layer. > > Let say VF can be member of 2 or more VLANs and upper layer would like = to have that information > > for further processing. > > Or special mirror VF, that does traffic snnoping, or something else. > > 2. Proposed implementation would introduce a slowdown for all VF RX rou= tines. > > 3. From the description it seems like the aim is to clear VLAN informat= ion for the RX packet. > > Though the patch actually clears VLAN info only for the RX packet whose= VLAN tag is not present inside SW copy of VFTA table. > > Which makes no much point to me: > > If VLAN is not present in HW VFTA table, then packet with that VLAN tag= will be discarded by HW anyway. > > If it is present inside VFTA table (both SW & HW), then VLAN informatio= n would be preserved with and without the patch. > > > > If you need to clear VLAN information, why not to do it on the upper la= yer - inside your application itself? > > Either create some sort of wrapper around rx_burst(), or setup an RX ca= ll-back for your VF device. > > > > Konstantin >=20 >=20 > The aim is to get SRIOV to work when the transparent VLAN tag feature is = used. > Please talk to the Linux driver team. Similar code exists there in ixgbev= f_process_skb_fields. Ah ok, I realised what you are trying to achieve now: You setup HW VFTA[] from the PF, so from VF point of view SW copy of the VF= TA[] remains unset. So HW will pass VLAN packet in, but then SW will clear VLAN tag. Ok, that clears #3 above, but I think #1,2 still remain.=20 >=20 > The other option is have a copy of all the receive logic which is only > used by VF code. Why that's the only option? Why can't you clear that VLAN information above the PMD layer? Keep/obtain a copy of VFTA[] somewhere on the upper layer, and do actual clear after rx_burst() returns? Konstantin >=20 > Tom has more details. But you can reproduce problem by just testing curre= nt > code with the transparent VLAN option. >=20 >=20