mbuf: update Tx VLAN and QinQ mbuf flags documentation

Message ID 20190402170947.8134-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series mbuf: update Tx VLAN and QinQ mbuf flags documentation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Ferruh Yigit April 2, 2019, 5:09 p.m. UTC
  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: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Chas Williams <3chas3@gmail.com>
---
 lib/librte_mbuf/rte_mbuf.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
  

Comments

Olivier Matz April 8, 2019, 7:16 a.m. UTC | #1
On Tue, Apr 02, 2019 at 06:09:46PM +0100, Ferruh Yigit wrote:
> 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: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Chas Williams <3chas3@gmail.com>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Acked-by: Olivier Matz <olivier.matz@6wind.com>

Thanks
  
Thomas Monjalon April 19, 2019, 8:56 p.m. UTC | #2
08/04/2019 09:16, Olivier Matz:
> On Tue, Apr 02, 2019 at 06:09:46PM +0100, Ferruh Yigit wrote:
> > 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: stable@dpdk.org
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 73daa8140..f61510f78 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -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 */