From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: [PATCH 2/2] mbuf: add MPLS packet type Date: Sun, 26 Aug 2018 18:24:55 +0530 Message-ID: <20180826125455.27393-2-jerin.jacob@caviumnetworks.com> References: <20180826125455.27393-1-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: olivier.matz@6wind.com, Jerin Jacob To: dev@dpdk.org Return-path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680047.outbound.protection.outlook.com [40.107.68.47]) by dpdk.org (Postfix) with ESMTP id B10072E81 for ; Sun, 26 Aug 2018 14:55:38 +0200 (CEST) In-Reply-To: <20180826125455.27393-1-jerin.jacob@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add support of MPLS packet type. Signed-off-by: Jerin Jacob --- lib/librte_mbuf/rte_mbuf_ptype.c | 1 + lib/librte_mbuf/rte_mbuf_ptype.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c index 71577f9b9..5954c2bc5 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 5693baeb8..8fe000a82 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. -- 2.18.0