[dpdk-dev] [PATCH] mbuf: rename Tx VLAN flags

Olivier Matz olivier.matz at 6wind.com
Mon Jan 29 10:37:07 CET 2018


For consistency with the Rx flags, the flags PKT_TX_VLAN_PKT and
PKT_TX_QINQ_PKT are respectively renamed as PKT_TX_VLAN and
PKT_TX_QINQ. The old defines are deprecated but will stay for some time
for compatibility.

Reported-by: Morten Brørup <mb at smartsharesystems.com>
Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
---
 doc/guides/rel_notes/deprecation.rst |  4 ++++
 lib/librte_mbuf/rte_mbuf.h           | 11 +++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e98ce6a0a..43a39d827 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -72,3 +72,7 @@ Deprecation Notices
   - ``CTRL_MBUF_FLAG``
 
   The packet mbuf API should be used as a replacement.
+
+* mbuf: The mbuf flags ``PKT_TX_VLAN_PKT`` and ``PKT_TX_QINQ_PKT`` are
+  respectively renamed as ``PKT_TX_VLAN`` and ``PKT_TX_QINQ``. The old
+  names will be removed in v18.08.
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 7835a2be8..4519fb303 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -244,7 +244,9 @@ extern "C" {
 /**
  * Second VLAN insertion (QinQ) flag.
  */
-#define PKT_TX_QINQ_PKT    (1ULL << 49)   /**< TX packet with double VLAN inserted. */
+#define PKT_TX_QINQ        (1ULL << 49)   /**< TX packet with double VLAN inserted. */
+/* this old name is deprecated */
+#define PKT_TX_QINQ_PKT    PKT_TX_QINQ
 
 /**
  * TCP segmentation offload. To enable this offload feature for a
@@ -305,7 +307,12 @@ extern "C" {
  */
 #define PKT_TX_IPV6          (1ULL << 56)
 
-#define PKT_TX_VLAN_PKT      (1ULL << 57) /**< TX packet is a 802.1q VLAN packet. */
+/**
+ * TX packet is a 802.1q VLAN packet.
+ */
+#define PKT_TX_VLAN          (1ULL << 57)
+/* this old name is deprecated */
+#define PKT_TX_VLAN_PKT      PKT_TX_VLAN
 
 /**
  * Offload the IP checksum of an external header in the hardware. The
-- 
2.11.0



More information about the dev mailing list