From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E00083237 for ; Tue, 2 Oct 2018 12:08:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2018 03:08:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,331,1534834800"; d="scan'208";a="267706459" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.49]) ([10.237.221.49]) by fmsmga005.fm.intel.com with ESMTP; 02 Oct 2018 03:08:27 -0700 To: Andrew Rybchenko , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Beilei Xing , Qi Zhang , Olivier Matz Cc: dev@dpdk.org, Hyong Youb Kim , John Daley References: <20181002101759.10395-1-ferruh.yigit@intel.com> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: Date: Tue, 2 Oct 2018 11:08:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mbuf: clarify QINQ flag usage 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 10:08:31 -0000 On 10/2/2018 10:44 AM, Andrew Rybchenko wrote: > On 10/2/18 1:17 PM, Ferruh Yigit wrote: >> Update implementation that when PKT_RX_QINQ_STRIPPED mbuf ol_flags >> set by PMD, PKT_RX_QINQ, PKT_RX_VLAN_STRIPPED & PKT_RX_VLAN >> should be also set. >> >> Clarify mbuf documentations that when PKT_RX_QINQ set PKT_RX_VLAN also >> should be set. >> >> So that appllication can rely on PKT_RX_QINQ flag to access both >> mbuf.vlan_tci & mbuf.vlan_tci_outer >> >> Signed-off-by: Ferruh Yigit >> --- >> Cc: Hyong Youb Kim >> Cc: John Daley >> --- >> app/test-pmd/rxonly.c | 2 +- >> doc/guides/nics/features.rst | 7 ++++--- >> drivers/net/i40e/i40e_rxtx.c | 3 ++- >> lib/librte_mbuf/rte_mbuf.c | 1 + >> lib/librte_mbuf/rte_mbuf.h | 5 +++-- >> 5 files changed, 11 insertions(+), 7 deletions(-) >> >> diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c >> index a93d80612..08a5fc2cf 100644 >> --- a/app/test-pmd/rxonly.c >> +++ b/app/test-pmd/rxonly.c >> @@ -132,7 +132,7 @@ pkt_burst_receive(struct fwd_stream *fs) >> printf(" - timestamp %"PRIu64" ", mb->timestamp); >> if (ol_flags & PKT_RX_VLAN_STRIPPED) > > It looks like it should be PKT_RX_VLAN above. There is already a patch from Hyong for it which triggered this patch: https://patches.dpdk.org/patch/45350/ > >> printf(" - VLAN tci=0x%x", mb->vlan_tci); >> - if (ol_flags & PKT_RX_QINQ_STRIPPED) >> + if (ol_flags & PKT_RX_QINQ) >> printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x", >> mb->vlan_tci, mb->vlan_tci_outer); > > The first one duplicates above printout, so it should be either put before > PKT_RX_VLAN check and do PKT_RX_VLAN in else branch, or simply removed > from here. Right, let me check it.