[PATCH] mbuf: expose outer vlan in mbuf dump

Kevin Traynor ktraynor at redhat.com
Mon Apr 4 12:33:09 CEST 2022


On 04/04/2022 07:15, Morten Brørup wrote:
>> From: Ben Magistro [mailto:koncept1 at gmail.com]
>> Sent: Monday, 4 April 2022 02.57
>>
>> Enable printing of the outer vlan if flags indicate it is present.
>>
>> Signed-off-by: Ben Magistro <koncept1 at gmail.com>
>>
>> ---
>>
>> While troubleshooting some QinQ offloads with various Intel i40e
>> firmware[1], it was
>> helpful to expose the outer vlan in the dump mbuf calls.  This should
>> be straightforward
>> to backport and happy to do the work if accepted. I understand that
>> this may not be a
>> widely supported capability at this time, so we are okay if this is not
>> accepted and
>> we just maintain a local patch.
> 
> Features are usually not backported, only bug fixes.
> 
> However, since this patch proved helpful finding a bug, and it is very simple, it could be considered by the LTS maintainers.
> 


Suggest to tag the patch with 'Cc: stable at dpdk.org' to indicate it is 
requested for stable branches. It will be caught by stable maintainer 
filters when it is time for backports and can be discussed further then.

(Note, it would need small rebase for older than 21.11 LTS to account 
for the namespaces that were added)

Kevin.

>>
>> ---
>>   lib/mbuf/rte_mbuf.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c
>> index 87592faccb..a2307cebe6 100644
>> --- a/lib/mbuf/rte_mbuf.c
>> +++ b/lib/mbuf/rte_mbuf.c
>> @@ -674,6 +674,9 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m,
>> unsigned dump_len)
>>   	fprintf(f, "  pkt_len=%u, ol_flags=%#"PRIx64", nb_segs=%u,
>> port=%u",
>>   		m->pkt_len, m->ol_flags, m->nb_segs, m->port);
>>
>> +	if (m->ol_flags & (RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_TX_QINQ))
>> +		fprintf(f, ", vlan_tci_outer=%u", m->vlan_tci_outer);
>> +
>>   	if (m->ol_flags & (RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_TX_VLAN))
>>   		fprintf(f, ", vlan_tci=%u", m->vlan_tci);
>>
>> --
>> 2.27.0
>>
> 
> Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
> 



More information about the stable mailing list