From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 4E4C52949 for ; Mon, 25 Apr 2016 15:51:06 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1augwe-00046H-2g; Mon, 25 Apr 2016 15:53:00 +0200 To: "Ananyev, Konstantin" , "'John Daley (johndale)'" , "dev@dpdk.org" References: <55ece514189d46d59cca2217214d89be@XCH-RCD-007.cisco.com> <2601191342CEEE43887BDE71AB97725836B415A3@irsmsx105.ger.corp.intel.com> From: Olivier Matz Message-ID: <571E20C0.2080509@6wind.com> Date: Mon, 25 Apr 2016 15:50:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <2601191342CEEE43887BDE71AB97725836B415A3@irsmsx105.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 13:51:06 -0000 Hi, 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 VLAN packet. */ > So yes, in theory it should be set up for vlan packet with both stripping 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 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 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. 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". The same could apply to PKT_RX_QINQ_PKT and m->outer_vlan_tci. We could add a new packet_type to tell if the mbuf is a VLAN/QinQ is detected in the packet but not stripped. Example: - vlan stripping is disabled - vlan packet recvd: flags=0, ptype=RTE_PTYPE_L2_ETHER_VLAN - qinq packet recvd: flags=0, ptype=RTE_PTYPE_L2_ETHER_QINQ - vlan stripping is enabled - vlan packet recvd: flags=PKT_RX_VLAN_PKT, ptype=RTE_PTYPE_L2_ETHER, m->vlan_tci=id - qinq packet recvd: flags=PKT_RX_VLAN_PKT|PKT_RX_QINQ_PKT, ptype=RTE_PTYPE_L2_ETHER, m->vlan_tci=id, m->vlan_tci_outer=id Thoughts? > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of John Daley (johndale) >> 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 purpose 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 >