From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BD70A04FD; Mon, 4 Apr 2022 08:15:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8DAF40698; Mon, 4 Apr 2022 08:15:24 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id EBD594068C; Mon, 4 Apr 2022 08:15:23 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] mbuf: expose outer vlan in mbuf dump Date: Mon, 4 Apr 2022 08:15:21 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D86F9B@smartserver.smartshare.dk> In-Reply-To: <20220404005634.2657-1-koncept1@gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] mbuf: expose outer vlan in mbuf dump Thread-Index: AdhHv9QNWkLXoOwVTEqjDUfo1B/S7gAKt1VA References: <20220404005634.2657-1-koncept1@gmail.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Ben Magistro" , Cc: , , X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Ben Magistro [mailto:koncept1@gmail.com] > Sent: Monday, 4 April 2022 02.57 >=20 > Enable printing of the outer vlan if flags indicate it is present. >=20 > Signed-off-by: Ben Magistro >=20 > --- >=20 > 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. >=20 > --- > lib/mbuf/rte_mbuf.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > 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=3D%u, ol_flags=3D%#"PRIx64", nb_segs=3D%u, > port=3D%u", > m->pkt_len, m->ol_flags, m->nb_segs, m->port); >=20 > + if (m->ol_flags & (RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_TX_QINQ)) > + fprintf(f, ", vlan_tci_outer=3D%u", m->vlan_tci_outer); > + > if (m->ol_flags & (RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_TX_VLAN)) > fprintf(f, ", vlan_tci=3D%u", m->vlan_tci); >=20 > -- > 2.27.0 >=20 Reviewed-by: Morten Br=F8rup