From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 635BE2952 for ; Mon, 25 Apr 2016 18:17:43 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 25 Apr 2016 09:17:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,533,1455004800"; d="scan'208";a="91574827" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga004.fm.intel.com with ESMTP; 25 Apr 2016 09:17:27 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.35]) by IRSMSX101.ger.corp.intel.com ([169.254.1.157]) with mapi id 14.03.0248.002; Mon, 25 Apr 2016 17:17:26 +0100 From: "Ananyev, Konstantin" To: Olivier Matz , "'John Daley (johndale)'" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] PKT_RX_VLAN_PKT when VLAN stripping is disabled Thread-Index: AdGcJLb1bs00/Tr/R5uEj1zfkCb1SAAbv2nQAJdZyAAABBEjcA== Date: Mon, 25 Apr 2016 16:17:26 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B4168C@irsmsx105.ger.corp.intel.com> References: <55ece514189d46d59cca2217214d89be@XCH-RCD-007.cisco.com> <2601191342CEEE43887BDE71AB97725836B415A3@irsmsx105.ger.corp.intel.com> <571E20C0.2080509@6wind.com> In-Reply-To: <571E20C0.2080509@6wind.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjVkNjBlOTgtZTIzYS00MTIzLWE5NTgtYzI2NmI0ODA3NzZmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IldoTWE5OE9FU1RLWG40aGhKNmx4MG9TR3BOU1JOcWk4SUFRbnFFWXJOZEU9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] PKT_RX_VLAN_PKT when VLAN stripping is disabled 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, 25 Apr 2016 16:17:43 -0000 Hi Olivier, > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Monday, April 25, 2016 2:51 PM > To: Ananyev, Konstantin; 'John Daley (johndale)'; dev@dpdk.org > Subject: Re: [dpdk-dev] PKT_RX_VLAN_PKT when VLAN stripping is disabled >=20 > Hi, >=20 > On 04/25/2016 02:02 PM, Ananyev, Konstantin wrote: > > Hi John, > > From rte_mbuf.h: > > #define PKT_RX_VLAN_PKT (1ULL << 0) /**< RX packet is a 802.1q VL= AN packet. */ > > So yes, in theory it should be set up for vlan packet with both strippi= ng on/off. > > The problem is that (as far as I know) when VLAN stripping is disabled = FVL RXD doesn't contain information > > does that packet contain a VLAN or not. > > Don't really know what is the best option in that case: keep things as = it is or change the meaning of > > the VLAN_PKT flag to indicate is mbuf.vlan_tci field is valid or not. > > Konstantin >=20 > It seems the meaning of the PKT_RX_VLAN_PKT bit depends on the port > configuration: > - if vlan stripping is configured, it means VLAN is present in vlan_tci > mbuf field > - if not configured, it means a VLAN is present in the packet >=20 > I don't think this is a good behavior since the application has to know > the port configuration to properly interpret the meaning of the flag. >=20 > I suggest to change the meaning of this flag to: "vlan was stripped by > hardware, and vlan tag is now located in m->vlan_tci". >=20 > The same could apply to PKT_RX_QINQ_PKT and m->outer_vlan_tci. >=20 > We could add a new packet_type to tell if the mbuf is a VLAN/QinQ is > detected in the packet but not stripped. >=20 > Example: >=20 > - vlan stripping is disabled >=20 > - vlan packet recvd: flags=3D0, ptype=3DRTE_PTYPE_L2_ETHER_VLAN > - qinq packet recvd: flags=3D0, ptype=3DRTE_PTYPE_L2_ETHER_QINQ >=20 > - vlan stripping is enabled >=20 > - vlan packet recvd: flags=3DPKT_RX_VLAN_PKT, ptype=3DRTE_PTYPE_L2_ETHE= R, > m->vlan_tci=3Did > - qinq packet recvd: flags=3DPKT_RX_VLAN_PKT|PKT_RX_QINQ_PKT, > ptype=3DRTE_PTYPE_L2_ETHER, m->vlan_tci=3Did, m->vlan_tci_outer= =3Did >=20 >=20 > Thoughts? Sounds like a reasonable change to me. Konstantin >=20 >=20 >=20 > > > >> -----Original Message----- > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of John Daley (johnd= ale) > >> Sent: Friday, April 22, 2016 12:37 AM > >> To: dev@dpdk.org > >> Subject: [dpdk-dev] PKT_RX_VLAN_PKT when VLAN stripping is disabled > >> > >> Hi, > >> > >> When VLAN stripping is disabled, X710 and 82599ES act differently for = me in this case when receiving VLAN tagged packets. On > >> 82599ES the flag is set but on X710 the flag not set. > >> > >> Do I maybe have old X710 firmware? Or is it not set for X710 on purpos= e in this case and instead the flag is used to indicate if > vlan_tci is > >> valid? Right now the enic pmd does what my X710 does, which I think is= incorrect and I want to fix it. > >> > >> Thanks, > >> John > >