Skip to contentSkip to conversation

mbuf: expose outer vlan in mbuf dump

PATCH Applied Ben Magistro 5 participants 9 messages Apr 4, 2022 – Jun 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mbuf: expose outer vlan in mbuf dump

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

---

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(+)
lib/mbuf/rte_mbuf.c +3 -0
index 87592faccb..a2307cebe6 100644
@@ -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);
 
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

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

---

Quoted 9 lines

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.

Quoted 21 lines
---
 lib/mbuf/rte_mbuf.c | 3 +++
 1 file changed, 3 insertions(+)
lib/mbuf/rte_mbuf.c +3 -0
index 87592faccb..a2307cebe6 100644
@@ -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);

Quoted 3 lines

--
2.27.0

#2 lore raw
Quoted 19 lines · Morten Brørup
Quoted 9 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

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

---

Quoted 9 lines

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.

Quoted 4 lines

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: [email protected]' 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.

Quoted 27 lines
Quoted 21 lines
---
  lib/mbuf/rte_mbuf.c | 3 +++
  1 file changed, 3 insertions(+)
lib/mbuf/rte_mbuf.c +3 -0
index 87592faccb..a2307cebe6 100644
@@ -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);
Quoted 3 lines

--
2.27.0

#3 lore raw

04/04/2022 12:33, Kevin Traynor:

Quoted 20 lines · Morten Brørup
Quoted 19 lines
Quoted 18 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

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

---

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.

Quoted 8 lines
Quoted 3 lines

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: [email protected]' 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.

I think it is a bug.
What was introduced first? the function or the field? Please find the commit where it should have been done and mark it with "Fixes:" syntax + Cc:stable.

Acked-by
#4 lore raw

Hi,

Quoted 8 lines · Thomas Monjalon

04/04/2022 12:33, Kevin Traynor:

Quoted 7 lines · Morten Brørup
Quoted 6 lines
Quoted 6 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

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

Quoted 18 lines
Quoted 18 lines
Quoted 16 lines
Quoted 12 lines

---

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.

Quoted 8 lines
Quoted 3 lines

Suggest to tag the patch with 'Cc: [email protected]' 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.

I think it is a bug.
What was introduced first? the function or the field? Please find the commit where it should have been done and mark it with "Fixes:" syntax + Cc:stable.

The vlan dump was introduced by commit 5b6eaea8ea7c ("mbuf: display more fields in dump"), but I don't think we can say it's a bug. To me, it is an enhancement that could be backported, because there is a benefit with a very low risk.

#5 lore raw

Was there a consensus on if this should be re-drafted as a bug and fixes or left as a backportable feature/improvement? I am good either way, just wanted to clarify if I had an additional action at this time.

Cheers

Quoted 50 lines · Olivier Matz

Hi,

Quoted 8 lines · Thomas Monjalon

04/04/2022 12:33, Kevin Traynor:

Quoted 7 lines · Morten Brørup
Quoted 6 lines
Quoted 6 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

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

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

---

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

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 5 lines

Suggest to tag the patch with 'Cc: [email protected]' 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.

Quoted 5 lines

I think it is a bug.
What was introduced first? the function or the field? Please find the commit where it should have been done and mark it with "Fixes:" syntax + Cc:stable.

The vlan dump was introduced by commit 5b6eaea8ea7c ("mbuf: display more fields in dump"), but I don't think we can say it's a bug. To me, it is an enhancement that could be backported, because there is a benefit with a very low risk.

#6 lore raw

12/04/2022 18:11, Ben Magistro:

Quoted 3 lines

Was there a consensus on if this should be re-drafted as a bug and fixes or left as a backportable feature/improvement? I am good either way, just wanted to clarify if I had an additional action at this time.

There is no consensus but that's a detail.

In any case we agree to backport it.
I'll merge it with Cc: [email protected]

Quoted 53 lines · Olivier Matz
Quoted 51 lines

Hi,

Quoted 8 lines · Thomas Monjalon

04/04/2022 12:33, Kevin Traynor:

Quoted 7 lines · Morten Brørup
Quoted 6 lines
Quoted 6 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

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

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

---

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

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 5 lines

Suggest to tag the patch with 'Cc: [email protected]' 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.

Quoted 5 lines

I think it is a bug.
What was introduced first? the function or the field? Please find the commit where it should have been done and mark it with "Fixes:" syntax + Cc:stable.

The vlan dump was introduced by commit 5b6eaea8ea7c ("mbuf: display more fields in dump"), but I don't think we can say it's a bug. To me, it is an enhancement that could be backported, because there is a benefit with a very low risk.

#7 lore raw
Quoted 6 lines

From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, 13 April 2022 14.03

12/04/2022 18:11, Ben Magistro:

Quoted 1 line

Was there a consensus on if this should be re-drafted as a bug and

fixes or

Quoted 8 lines
Quoted 1 line

left as a backportable feature/improvement? I am good either way,

just

Quoted 1 line

wanted to clarify if I had an additional action at this time.

There is no consensus but that's a detail.

In any case we agree to backport it.
I'll merge it with Cc: [email protected]

+1 to that, Thomas!

Quoted 69 lines
Quoted 3 lines

On Wed, Apr 6, 2022 at 3:33 AM Olivier Matz <[email protected]>

Quoted 10 lines · wrote:
Quoted 10 lines

Hi,

Quoted 6 lines · Thomas Monjalon

04/04/2022 12:33, Kevin Traynor:

Quoted 5 lines · Morten Brørup
Quoted 4 lines
Quoted 4 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

Enable printing of the outer vlan if flags indicate it is

present.

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

---

While troubleshooting some QinQ offloads with various Intel

i40e

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

firmware[1], it was
helpful to expose the outer vlan in the dump mbuf calls.

This

Quoted 3 lines
Quoted 3 lines

should

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

be straightforward
to backport and happy to do the work if accepted. I

understand that

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

this may not be a
widely supported capability at this time, so we are okay if

this is

Quoted 7 lines
Quoted 7 lines

not

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

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

Quoted 4 lines
Quoted 4 lines

very simple, it could be considered by the LTS maintainers.

Quoted 3 lines
Quoted 3 lines

Suggest to tag the patch with 'Cc: [email protected]' to indicate

it is

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

requested for stable branches. It will be caught by stable

maintainer

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

filters when it is time for backports and can be discussed

further

Quoted 8 lines
Quoted 8 lines

then.

Quoted 5 lines

I think it is a bug.
What was introduced first? the function or the field? Please find the commit where it should have been done and mark it with "Fixes:" syntax + Cc:stable.

The vlan dump was introduced by commit 5b6eaea8ea7c ("mbuf: display

more

Quoted 1 line
Quoted 1 line

fields in dump"), but I don't think we can say it's a bug. To me,

it is

Quoted 1 line
Quoted 1 line

an enhancement that could be backported, because there is a benefit

with

Quoted 3 lines
Quoted 2 lines

a very low risk.

#8 lore raw

13/04/2022 14:59, Morten Brørup:

Quoted 8 lines
Quoted 8 lines

From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, 13 April 2022 14.03

12/04/2022 18:11, Ben Magistro:

Quoted 1 line

Was there a consensus on if this should be re-drafted as a bug and

fixes or

Quoted 1 line

left as a backportable feature/improvement? I am good either way,

just

Quoted 28 lines
Quoted 6 lines
Quoted 1 line

wanted to clarify if I had an additional action at this time.

There is no consensus but that's a detail.

In any case we agree to backport it.
I'll merge it with Cc: [email protected]

+1 to that, Thomas!

Quoted 19 lines
Quoted 3 lines

On Wed, Apr 6, 2022 at 3:33 AM Olivier Matz <[email protected]>

Quoted 10 lines · wrote:
Quoted 10 lines

Hi,

Quoted 6 lines · Thomas Monjalon

04/04/2022 12:33, Kevin Traynor:

Quoted 5 lines · Morten Brørup
Quoted 4 lines
Quoted 4 lines

From: Ben Magistro [mailto:[email protected]]
Sent: Monday, 4 April 2022 02.57

Enable printing of the outer vlan if flags indicate it is

present.

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Applied, thanks.