All of lore.kernel.org
 help / color / mirror / Atom feed
From: Beilei Xing <beilei.xing@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, jingjing.wu@intel.com, andrey.chilikin@intel.com
Subject: [PATCH v2 1/2] mbuf: add PPPoE and L2TP packet types
Date: Wed, 20 Dec 2017 16:22:43 +0800	[thread overview]
Message-ID: <1513758164-39610-2-git-send-email-beilei.xing@intel.com> (raw)
In-Reply-To: <1513758164-39610-1-git-send-email-beilei.xing@intel.com>

Add support of PPPoE and L2TP packet types.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 lib/librte_mbuf/rte_mbuf_ptype.c |  2 ++
 lib/librte_mbuf/rte_mbuf_ptype.h | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c
index a623226..e0f2a92 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 5c62435..256f024 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -153,6 +153,13 @@ extern "C" {
  */
 #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.
  */
@@ -426,6 +433,25 @@ extern "C" {
  */
 #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.
  */
 #define RTE_PTYPE_TUNNEL_MASK               0x0000f000
-- 
2.5.5

  reply	other threads:[~2017-12-20  8:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 10:12 [PATCH 0/2] support PPPoE and L2TP in SW ptype parser Beilei Xing
2017-11-28 10:12 ` [PATCH 1/2] mbuf: support PPPoE and L2TP in software packet type parser Beilei Xing
2017-12-19 10:11   ` Olivier MATZ
2017-12-20  3:13     ` Xing, Beilei
2017-11-28 10:12 ` [PATCH 2/2] net/i40e: support PPPoE and L2TP in SW ptype parser function Beilei Xing
2017-12-20  8:22 ` [PATCH v2 0/2] support PPPoE and L2TP packet types Beilei Xing
2017-12-20  8:22   ` Beilei Xing [this message]
2018-01-03 10:36     ` [PATCH v2 1/2] mbuf: add " Olivier Matz
2017-12-20  8:22   ` [PATCH v2 2/2] net/i40e: support PPPoE and L2TP ptype parser Beilei Xing
2018-01-04  8:43     ` Zhang, Qi Z
2018-01-04 10:46   ` [PATCH v3 0/2] support PPPoE and L2TP packet types Beilei Xing
2018-01-04 10:46     ` [PATCH v3 1/2] mbuf: add " Beilei Xing
2018-01-04 10:46     ` [PATCH v3 2/2] net/i40e: improve packet type parser Beilei Xing
2018-01-04 11:54       ` Zhang, Qi Z
2018-01-07  9:16     ` [PATCH v3 0/2] support PPPoE and L2TP packet types Zhang, Helin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513758164-39610-2-git-send-email-beilei.xing@intel.com \
    --to=beilei.xing@intel.com \
    --cc=andrey.chilikin@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.