From: Jerin Jacob Date: Sun, 26 Aug 2018 12:54:55 +0000 (+0530) Subject: mbuf: add MPLS packet type X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8e255bdb1bc40bef55e924812df97c569475811f;p=dpdk.git mbuf: add MPLS packet type Add support of MPLS packet type. Signed-off-by: Jerin Jacob Acked-by: Olivier Matz --- diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c index 71577f9b98..5954c2bc5e 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 5693baeb8a..8fe000a824 100644 --- a/lib/librte_mbuf/rte_mbuf_ptype.h +++ b/lib/librte_mbuf/rte_mbuf_ptype.h @@ -137,6 +137,13 @@ extern "C" { * <'ether type'=[0x8906]> */ #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.