From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id E00083237
 for <dev@dpdk.org>; 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 <arybchenko@solarflare.com>,
 Wenzhuo Lu <wenzhuo.lu@intel.com>, Jingjing Wu <jingjing.wu@intel.com>,
 Bernard Iremonger <bernard.iremonger@intel.com>,
 John McNamara <john.mcnamara@intel.com>,
 Marko Kovacevic <marko.kovacevic@intel.com>,
 Beilei Xing <beilei.xing@intel.com>, Qi Zhang <qi.z.zhang@intel.com>,
 Olivier Matz <olivier.matz@6wind.com>
Cc: dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>,
 John Daley <johndale@cisco.com>
References: <20181002101759.10395-1-ferruh.yigit@intel.com>
 <c51146a4-2a8e-ca06-be3f-ccb0197073f9@solarflare.com>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Openpgp: preference=signencrypt
Message-ID: <ccdfb532-bfe7-9c56-80dc-b9e872e75ce0@intel.com>
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: <c51146a4-2a8e-ca06-be3f-ccb0197073f9@solarflare.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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 <ferruh.yigit@intel.com>
>> ---
>> Cc: Hyong Youb Kim <hyonkim@cisco.com>
>> Cc: John Daley <johndale@cisco.com>
>> ---
>>   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.