Skip to contentSkip to conversation

mbuf: update Tx VLAN and QinQ mbuf flags documentation

PATCH Applied Ferruh Yigit 3 participants 3 messages Apr 2, 2019 – Apr 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mbuf: update Tx VLAN and QinQ mbuf flags documentation

Currently PKT_TX_VLAN and PKT_TX_QINQ mbuf flags are documented as they are to say packet contains VLAN or QINQ information.

Updating the definition as they are requests from application to driver to insert VLAN or double VLAN tags into packet.

Fixes dc6c911c9993 ("mbuf: use reserved space for double vlan")
Fixes af75078fece3 ("first public release")

---
Cc: Chas Williams <[email protected]>

---
 lib/librte_mbuf/rte_mbuf.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
lib/librte_mbuf/rte_mbuf.h +7 -3
index 73daa8140..f61510f78 100644
@@ -279,9 +279,11 @@ extern "C" {
 #define PKT_TX_TUNNEL_MASK    (0xFULL << 45)
 
 /**
- * Second VLAN insertion (QinQ) flag.
+ * Double VLAN insertion (QINQ) request to driver, driver may offload the
+ * insertion based on device capability.
+ * mbuf 'vlan_tci' & 'vlan_tci_outer' must be valid when this flag is set.
  */
-#define PKT_TX_QINQ        (1ULL << 49)   /**< TX packet with double VLAN inserted. */
+#define PKT_TX_QINQ        (1ULL << 49)
 /* this old name is deprecated */
 #define PKT_TX_QINQ_PKT    PKT_TX_QINQ
 
@@ -337,7 +339,9 @@ extern "C" {
 #define PKT_TX_IPV6          (1ULL << 56)
 
 /**
- * TX packet is a 802.1q VLAN packet.
+ * VLAN tag insertion request to driver, driver may offload the insertion
+ * based on the device capability.
+ * mbuf 'vlan_tci' field must be valid when this flag is set.
  */
 #define PKT_TX_VLAN          (1ULL << 57)
 /* this old name is deprecated */
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Ferruh Yigit

Currently PKT_TX_VLAN and PKT_TX_QINQ mbuf flags are documented as they are to say packet contains VLAN or QINQ information.

Updating the definition as they are requests from application to driver to insert VLAN or double VLAN tags into packet.

Fixes dc6c911c9993 ("mbuf: use reserved space for double vlan")
Fixes af75078fece3 ("first public release")
Quoted 6 lines

---
Cc: Chas Williams <[email protected]>

---
 lib/librte_mbuf/rte_mbuf.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Thanks

#2 lore raw

08/04/2019 09:16, Olivier Matz:

Quoted 7 lines · Ferruh Yigit
Quoted 6 lines

Currently PKT_TX_VLAN and PKT_TX_QINQ mbuf flags are documented as they are to say packet contains VLAN or QINQ information.

Updating the definition as they are requests from application to driver to insert VLAN or double VLAN tags into packet.

Quoted 7 lines
Quoted 5 lines
Fixes dc6c911c9993 ("mbuf: use reserved space for double vlan")
Fixes af75078fece3 ("first public release")

Applied, thanks