From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) by dpdk.org (Postfix) with ESMTP id E6C224C8E for ; Tue, 2 Oct 2018 04:30:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2591; q=dns/txt; s=iport; t=1538447408; x=1539657008; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WjmoDhXv61XMUCF4RN5A/baEkttlq1Q1DfDfA1a0wok=; b=X/Pxg8JpBJ1QQicFmapoYza9oEhKo2nmvkSxhPnsFkBtXxI2SQOF0FIU kPWMWkS1s8mKLbgnec+huIx1E53hYVWbmdrU2z5LifNqLeHuA407lzw2k zBEqEozcJSGVln9vfFJrpc1MB6OGw/NNhFxbPMPPZ/SLTJXnHpgFjnRqP 0=; X-IronPort-AV: E=Sophos;i="5.54,329,1534809600"; d="scan'208";a="179536057" Received: from alln-core-4.cisco.com ([173.36.13.137]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2018 02:30:06 +0000 Received: from HYONKIM-7R0DR.cisco.com ([10.24.89.235]) by alln-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id w922U0aa016860 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 2 Oct 2018 02:30:04 GMT Date: Tue, 2 Oct 2018 11:29:59 +0900 From: Hyong Youb Kim To: Ferruh Yigit Cc: John Daley , wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, olivier.matz@6wind.com, dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com Message-ID: <20181002022958.GA14560@HYONKIM-7R0DR.cisco.com> References: <20180926030617.6702-1-johndale@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Outbound-SMTP-Client: 10.24.89.235, [10.24.89.235] X-Outbound-Node: alln-core-4.cisco.com Subject: Re: [dpdk-dev] [PATCH] app/testpmd: check Rx VLAN offload flag to print VLAN TCI 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, 02 Oct 2018 02:30:08 -0000 On Mon, Oct 01, 2018 at 03:01:40PM +0100, Ferruh Yigit wrote: > On 9/26/2018 4:06 AM, John Daley wrote: > > From: Hyong Youb Kim > > > > Since the following commit, PKT_RX_VLAN indicates the presence of > > mbuf's vlan_tci, not PKT_RX_VLAN_STRIPPED. > > > > commit 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags") > > Cc: olivier.matz@6wind.com > > > > Signed-off-by: Hyong Youb Kim > > Reviewed-by: John Daley > > --- > > app/test-pmd/rxonly.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c > > index a93d80612..e8d226624 100644 > > --- a/app/test-pmd/rxonly.c > > +++ b/app/test-pmd/rxonly.c > > @@ -130,7 +130,7 @@ pkt_burst_receive(struct fwd_stream *fs) > > } > > if (ol_flags & PKT_RX_TIMESTAMP) > > printf(" - timestamp %"PRIu64" ", mb->timestamp); > > - if (ol_flags & PKT_RX_VLAN_STRIPPED) > > + if (ol_flags & PKT_RX_VLAN) > > printf(" - VLAN tci=0x%x", mb->vlan_tci); > > if (ol_flags & PKT_RX_QINQ_STRIPPED) > > printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x", > > Isn't same also correct for QinQ, PKT_RX_QINQ means mb->vlan_tci & > mb->vlan_tci_outer are set? > That is a good point. According to rte_mbuf.h, PKT_RX_QINQ means "The RX packet is a double VLAN, and the outer tci has been saved in in mbuf->vlan_tci_outer." Here is a summary. PKT_RX_VLAN => vlan_tci is set PKT_RX_QINQ => vlan_tci_outer is set PKT_RX_VLAN_STRIPPED => must also set PKT_RX_VLAN PKT_RX_QINQ_STRIPPED => must also set PKT_RX_VLAN, PKT_RX_QINQ, PKT_RX_VLAN_STRIPPED Looks like i40e is the only driver that is using PKT_RX_QINQ_STRIPPED. And, it does not set PKT_RX_QINQ. I am CC'ing i40e maintainers. Back to rxonly.. + if (ol_flags & (PKT_RX_QINQ | PKT_RX_VLAN)) printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x", mb->vlan_tci, mb->vlan_tci_outer); A change like this would be technically correct, but may break i40e test cases. Or, if the above message is really meant for 'stripped', then perhaps add comment or rephrase the message for now? As for the use of PKT_RX_VLAN, some drivers like enic and ixgbe can set PKT_RX_VLAN independent of vlan stripping, which led me to writing this patch. I think Olivier fixed all drivers when he introduced PKT_RX_VLAN. So using PKT_RX_VLAN in rxonly shouldn't be breaking anyone's test cases. -Hyong