patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] mbuf: expose outer vlan in mbuf dump
@ 2022-04-04  0:56 Ben Magistro
  2022-04-04  6:15 ` Morten Brørup
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Magistro @ 2022-04-04  0:56 UTC (permalink / raw)
  To: dev; +Cc: ben.magistro, stefan.baranoff, stable, Ben Magistro

Enable printing of the outer vlan if flags indicate it is present.

Signed-off-by: Ben Magistro <koncept1@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.

---
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-01  9:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04  0:56 [PATCH] mbuf: expose outer vlan in mbuf dump Ben Magistro
2022-04-04  6:15 ` Morten Brørup
2022-04-04 10:33   ` Kevin Traynor
2022-04-05 15:51     ` Thomas Monjalon
2022-04-06  7:33       ` Olivier Matz
2022-04-12 16:11         ` Ben Magistro
2022-04-13 12:02           ` Thomas Monjalon
2022-04-13 12:59             ` Morten Brørup
2022-06-01  9:18               ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).