[dpdk-dev] [RFC v1 5/5] mbuf: add L3 VXLAN packet type

Xueming Li xuemingl at mellanox.com
Sun Dec 3 07:08:12 CET 2017


Add new L3 VXLAN packet type, no inner L2 layer comparing to standard
VXLAN

Signed-off-by: Xueming Li <xuemingl at mellanox.com>
---
 lib/librte_mbuf/rte_mbuf_ptype.c |  1 +
 lib/librte_mbuf/rte_mbuf_ptype.h | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c
index a623226cc..a688879b7 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.c
+++ b/lib/librte_mbuf/rte_mbuf_ptype.c
@@ -92,6 +92,7 @@ const char *rte_get_ptype_tunnel_name(uint32_t ptype)
 	case RTE_PTYPE_TUNNEL_GTPC: return "TUNNEL_GTPC";
 	case RTE_PTYPE_TUNNEL_GTPU: return "TUNNEL_GTPU";
 	case RTE_PTYPE_TUNNEL_ESP: return "TUNNEL_ESP";
+	case RTE_PTYPE_TUNNEL_L3VXLAN: return "TUNNEL_L3VXLAN";
 	default: return "TUNNEL_UNKNOWN";
 	}
 }
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index 5c62435ce..82e6d28a2 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -426,6 +426,19 @@ extern "C" {
  */
 #define RTE_PTYPE_TUNNEL_ESP                0x00009000
 /**
+ * L3 VXLAN (Virtual eXtensible Local Area Network) tunneling packet type.
+ *
+ * Packet format:
+ * <'ether type'=0x0800
+ * | 'version'=4, 'protocol'=17
+ * | 'destination port'=any>
+ * or,
+ * <'ether type'=0x86DD
+ * | 'version'=6, 'next header'=17
+ * | 'destination port'=any>
+ */
+#define RTE_PTYPE_TUNNEL_L3VXLAN            0x0000a000
+/**
  * Mask of tunneling packet types.
  */
 #define RTE_PTYPE_TUNNEL_MASK               0x0000f000
-- 
2.13.3



More information about the dev mailing list