From: Andrew Rybchenko Subject: Re: [PATCH] mbuf: clarify QINQ flag usage Date: Tue, 2 Oct 2018 12:44:14 +0300 Message-ID: References: <20181002101759.10395-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , Hyong Youb Kim , John Daley To: Ferruh Yigit , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , "Marko Kovacevic" , Beilei Xing , Qi Zhang , Olivier Matz Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id E7DFD2BD3 for ; Tue, 2 Oct 2018 11:45:07 +0200 (CEST) In-Reply-To: <20181002101759.10395-1-ferruh.yigit@intel.com> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > 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. <...>