DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC PATCH] mbuf: fix to update documentation of PKT_RX_QINQ_STRIPPED
@ 2019-12-16  3:16 Somnath Kotur
  2019-12-16  6:31 ` Andrew Rybchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Somnath Kotur @ 2019-12-16  3:16 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

Certain hardware may be able to strip and/or save only the outermost
VLAN instead of both the VLANs in the mbuf in a QinQ scenario.
To handle such cases, we could re-interpret setting of just PKT_RX_QINQ_STRIPPED
to indicate that only the outermost VLAN has been stripped by the hardware and
saved in mbuf->vlan_tci_outer.
Only When both PKT_RX_QINQ_STRIPPED and PKT_RX_VLAN_STRIPPED are set, the 2 vlans
have been stripped by the hardware and their tci are saved in mbuf->vlan_tci (inner)
and mbuf->vlan_tci_outer (outer).

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: JP Lee <jongpil.lee@broadcom.com>
---
 lib/librte_mbuf/rte_mbuf_core.h | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 9a8557d..db1070b 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -124,12 +124,19 @@
 #define PKT_RX_FDIR_FLX      (1ULL << 14)
 
 /**
- * The 2 vlans have been stripped by the hardware and their tci are
- * saved in mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer).
+ * The outer vlan has been stripped by the hardware and their tci are
+ * saved in mbuf->vlan_tci_outer (outer).
  * This can only happen if vlan stripping is enabled in the RX
  * configuration of the PMD.
- * When PKT_RX_QINQ_STRIPPED is set, the flags (PKT_RX_VLAN |
- * PKT_RX_VLAN_STRIPPED | PKT_RX_QINQ) must also be set.
+ * When PKT_RX_QINQ_STRIPPED is set, the flags (PKT_RX_VLAN |  PKT_RX_QINQ)
+ * must also be set.
+ * When both PKT_RX_QINQ_STRIPPED and PKT_RX_VLAN_STRIPPED are set, the 2 vlans
+ * have been stripped by the hardware and their tci are saved in
+ * mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer).
+ * This can only happen if vlan stripping is enabled in the RX configuration
+ * of the PMD.
+ * When PKT_RX_QINQ_STRIPPED and PKT_RX_VLAN_STRIPPED are set,
+ * (PKT_RX_VLAN | PKT_RX_QINQ) must also be set.
  */
 #define PKT_RX_QINQ_STRIPPED (1ULL << 15)
 
-- 
1.8.3.1


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

end of thread, other threads:[~2020-01-06  8:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16  3:16 [dpdk-dev] [RFC PATCH] mbuf: fix to update documentation of PKT_RX_QINQ_STRIPPED Somnath Kotur
2019-12-16  6:31 ` Andrew Rybchenko
2019-12-16  8:47   ` Somnath Kotur
2019-12-16  9:13     ` Andrew Rybchenko
2019-12-24  3:16       ` Somnath Kotur
2019-12-24  9:53         ` Andrew Rybchenko
2019-12-27 14:50           ` Olivier Matz
2019-12-31  2:13             ` Somnath Kotur
2020-01-02 12:57             ` Andrew Rybchenko
2019-12-31  2:15           ` Somnath Kotur
2020-01-02 13:04             ` Andrew Rybchenko
2020-01-06  8:36               ` Somnath Kotur

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