From: Beilei Xing Date: Thu, 4 Jan 2018 10:46:20 +0000 (+0800) Subject: mbuf: add PPPoE and L2TP packet types X-Git-Tag: spdx-start~537 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=108b6a28e801625cb92ac785787db1b1ced43155;p=dpdk.git mbuf: add PPPoE and L2TP packet types Add support of PPPoE and L2TP packet types. Signed-off-by: Beilei Xing Acked-by: Olivier Matz --- diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c index a623226cc6..e0f2a92d1e 100644 --- a/lib/librte_mbuf/rte_mbuf_ptype.c +++ b/lib/librte_mbuf/rte_mbuf_ptype.c @@ -47,6 +47,7 @@ const char *rte_get_ptype_l2_name(uint32_t ptype) case RTE_PTYPE_L2_ETHER_NSH: return "L2_ETHER_NSH"; case RTE_PTYPE_L2_ETHER_VLAN: return "L2_ETHER_VLAN"; case RTE_PTYPE_L2_ETHER_QINQ: return "L2_ETHER_QINQ"; + case RTE_PTYPE_L2_ETHER_PPPOE: return "L2_ETHER_PPPOE"; default: return "L2_UNKNOWN"; } } @@ -92,6 +93,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_L2TP: return "TUNNEL_L2TP"; default: return "TUNNEL_UNKNOWN"; } } diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h index 5c62435ce2..256f024b65 100644 --- a/lib/librte_mbuf/rte_mbuf_ptype.h +++ b/lib/librte_mbuf/rte_mbuf_ptype.h @@ -152,6 +152,13 @@ extern "C" { * <'ether type'=[0x88A8]> */ #define RTE_PTYPE_L2_ETHER_QINQ 0x00000007 +/** + * PPPOE packet type. + * + * Packet format: + * <'ether type'=[0x8863|0x8864]> + */ +#define RTE_PTYPE_L2_ETHER_PPPOE 0x00000008 /** * Mask of layer 2 packet types. * It is used for outer packet for tunneling cases. @@ -425,6 +432,25 @@ extern "C" { * | 'version'=6, 'next header'=51> */ #define RTE_PTYPE_TUNNEL_ESP 0x00009000 +/** + * L2TP (Layer 2 Tunneling Protocol) tunnleing packet type. + * + * Packet format: + * <'ether type'=0x0800 + * | 'version'=4, 'protocol'=17> + * | 'destination port'=1701> + * or, + * <'ether type'=0x86DD + * | 'version'=6, 'next header'=17 + * | 'destination port'=1701> + * or, + * <'ether type'=0x0800 + * | 'version'=4, 'protocol'=115> + * or, + * <'ether type'=0x86DD + * | 'version'=6, 'protocol'=115> + */ +#define RTE_PTYPE_TUNNEL_L2TP 0x0000a000 /** * Mask of tunneling packet types. */