summaryrefslogtreecommitdiff
path: root/lib/librte_mbuf
diff options
context:
space:
mode:
authorJerin Jacob <jerin.jacob@caviumnetworks.com>2018-08-26 18:24:55 +0530
committerThomas Monjalon <thomas@monjalon.net>2018-10-25 15:48:30 +0200
commit8e255bdb1bc40bef55e924812df97c569475811f (patch)
treef68a8df607c94dc63c7e84c662ca231d42b68ab7 /lib/librte_mbuf
parent07e70104e0556a6a66797f3cc5be88ace8e4d721 (diff)
downloaddpdk-8e255bdb1bc40bef55e924812df97c569475811f.zip
dpdk-8e255bdb1bc40bef55e924812df97c569475811f.tar.gz
dpdk-8e255bdb1bc40bef55e924812df97c569475811f.tar.xz
mbuf: add MPLS packet type
Add support of MPLS packet type. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'lib/librte_mbuf')
-rw-r--r--lib/librte_mbuf/rte_mbuf_ptype.c1
-rw-r--r--lib/librte_mbuf/rte_mbuf_ptype.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c
index 71577f9..5954c2b 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.c
+++ b/lib/librte_mbuf/rte_mbuf_ptype.c
@@ -20,6 +20,7 @@ const char *rte_get_ptype_l2_name(uint32_t ptype)
case RTE_PTYPE_L2_ETHER_QINQ: return "L2_ETHER_QINQ";
case RTE_PTYPE_L2_ETHER_PPPOE: return "L2_ETHER_PPPOE";
case RTE_PTYPE_L2_ETHER_FCOE: return "L2_ETHER_FCOE";
+ case RTE_PTYPE_L2_ETHER_MPLS: return "L2_ETHER_MPLS";
default: return "L2_UNKNOWN";
}
}
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index 5693bae..8fe000a 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -138,6 +138,13 @@ extern "C" {
*/
#define RTE_PTYPE_L2_ETHER_FCOE 0x00000009
/**
+ * MPLS packet type.
+ *
+ * Packet format:
+ * <'ether type'=[0x8847|0x8848]>
+ */
+#define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a
+/**
* Mask of layer 2 packet types.
* It is used for outer packet for tunneling cases.
*/