[dpdk-dev] [PATCH] mbuf: clarify QINQ flag usage
Ferruh Yigit
ferruh.yigit at intel.com
Tue Oct 2 12:08:27 CEST 2018
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 at intel.com>
>> ---
>> Cc: Hyong Youb Kim <hyonkim at cisco.com>
>> Cc: John Daley <johndale at 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.
More information about the dev
mailing list