Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/102586/?format=api
http://patches.dpdk.org/api/patches/102586/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211021104924.1586172-2-jie1x.wang@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211021104924.1586172-2-jie1x.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211021104924.1586172-2-jie1x.wang@intel.com", "date": "2021-10-21T10:49:22", "name": "[v9,1/3] ethdev: support L2TPv2 and PPP procotol", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a466518c53e498f7500cd03597630745740e76c4", "submitter": { "id": 2201, "url": "http://patches.dpdk.org/api/people/2201/?format=api", "name": "Jie Wang", "email": "jie1x.wang@intel.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211021104924.1586172-2-jie1x.wang@intel.com/mbox/", "series": [ { "id": 19880, "url": "http://patches.dpdk.org/api/series/19880/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19880", "date": "2021-10-21T10:49:21", "name": "support PPPoL2TPv2oUDP RSS Hash", "version": 9, "mbox": "http://patches.dpdk.org/series/19880/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/102586/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/102586/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8F53BA0547;\n\tThu, 21 Oct 2021 12:50:27 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 758844117A;\n\tThu, 21 Oct 2021 12:50:27 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 4D297410E2\n for <dev@dpdk.org>; Thu, 21 Oct 2021 12:50:26 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Oct 2021 03:50:24 -0700", "from dpdk.cd.intel.com ([10.240.178.133])\n by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Oct 2021 03:50:19 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10143\"; a=\"289845359\"", "E=Sophos;i=\"5.87,169,1631602800\"; d=\"scan'208\";a=\"289845359\"", "E=Sophos;i=\"5.87,169,1631602800\"; d=\"scan'208\";a=\"484152641\"" ], "From": "Jie Wang <jie1x.wang@intel.com>", "To": "dev@dpdk.org", "Cc": "orika@nvidia.com, ferruh.yigit@intel.com, thomas@monjalon.net,\n andrew.rybchenko@oktetlabs.ru, xiaoyun.li@intel.com, stevex.yang@intel.com,\n jingjing.wu@intel.com, beilei.xing@intel.com, wenjun1.wu@intel.com,\n qi.z.zhang@intel.com, Jie Wang <jie1x.wang@intel.com>", "Date": "Thu, 21 Oct 2021 18:49:22 +0800", "Message-Id": "<20211021104924.1586172-2-jie1x.wang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211021104924.1586172-1-jie1x.wang@intel.com>", "References": "<20211021100527.1582052-1-jie1x.wang@intel.com>\n <20211021104924.1586172-1-jie1x.wang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v9 1/3] ethdev: support L2TPv2 and PPP procotol", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Added flow pattern items and header formats of L2TPv2 and PPP.\n\nSigned-off-by: Wenjun Wu <wenjun1.wu@intel.com>\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n doc/api/doxy-api-index.md | 2 +\n doc/guides/nics/features/default.ini | 2 +\n doc/guides/prog_guide/rte_flow.rst | 25 +++\n doc/guides/rel_notes/release_21_11.rst | 4 +\n lib/ethdev/rte_flow.c | 2 +\n lib/ethdev/rte_flow.h | 67 +++++++\n lib/net/meson.build | 2 +\n lib/net/rte_l2tpv2.h | 234 +++++++++++++++++++++++++\n lib/net/rte_ppp.h | 34 ++++\n 9 files changed, 372 insertions(+)\n create mode 100644 lib/net/rte_l2tpv2.h\n create mode 100644 lib/net/rte_ppp.h", "diff": "diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md\nindex 1992107a03..42db196afe 100644\n--- a/doc/api/doxy-api-index.md\n+++ b/doc/api/doxy-api-index.md\n@@ -121,6 +121,8 @@ The public API headers are grouped by topics:\n [VXLAN] (@ref rte_vxlan.h),\n [Geneve] (@ref rte_geneve.h),\n [eCPRI] (@ref rte_ecpri.h)\n+ [L2TPv2] (@ref rte_l2tpv2.h)\n+ [PPP] (@ref rte_ppp.h)\n \n - **QoS**:\n [metering] (@ref rte_meter.h),\ndiff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini\nindex 09914b1ad3..8e6a28c419 100644\n--- a/doc/guides/nics/features/default.ini\n+++ b/doc/guides/nics/features/default.ini\n@@ -110,6 +110,7 @@ ipv4 =\n ipv6 =\n ipv6_ext =\n ipv6_frag_ext =\n+l2tpv2 =\n l2tpv3oip =\n mark =\n meta =\n@@ -121,6 +122,7 @@ pfcp =\n phy_port =\n port_id =\n port_representor =\n+ppp =\n pppoed =\n pppoes =\n pppoe_proto_id =\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex aeba374182..a2169517c3 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1573,6 +1573,31 @@ rte_flow_flex_item_create() routine.\n as padded with trailing zeroes up to full configured length, both for\n value and mask.\n \n+Item: ``L2TPV2``\n+^^^^^^^^^^^^^^^^^^^\n+\n+Matches a L2TPv2 header.\n+\n+- ``flags_version``: flags(12b), version(4b).\n+- ``length``: total length of the message.\n+- ``tunnel_id``: identifier for the control connection.\n+- ``session_id``: identifier for a session within a tunnel.\n+- ``ns``: sequence number for this date or control message.\n+- ``nr``: sequence number expected in the next control message to be received.\n+- ``offset_size``: offset of payload data.\n+- ``offset_padding``: offset padding, variable length.\n+- Default ``mask`` matches flags_version only.\n+\n+Item: ``PPP``\n+^^^^^^^^^^^^^^^^^^^\n+\n+Matches a PPP header.\n+\n+- ``addr``: PPP address.\n+- ``ctrl``: PPP control.\n+- ``proto_id``: PPP protocol identifier.\n+- Default ``mask`` matches addr, ctrl, proto_id.\n+\n Actions\n ~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex 041383ee2a..283770131c 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -105,6 +105,10 @@ New Features\n \n Added an ethdev API which can help users get device configuration.\n \n+* **Added L2TPv2 and PPP protocol support in rte_flow.**\n+\n+ Added flow pattern items and header formats of L2TPv2 and PPP protocol.\n+\n * **Updated AF_XDP PMD.**\n \n * Disabled secondary process support.\ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex bcf0513b3c..d268784532 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -156,6 +156,8 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(REPRESENTED_PORT, sizeof(struct rte_flow_item_ethdev)),\n \tMK_FLOW_ITEM_FN(FLEX, sizeof(struct rte_flow_item_flex),\n \t\t\trte_flow_item_flex_conv),\n+\tMK_FLOW_ITEM(L2TPV2, sizeof(struct rte_flow_item_l2tpv2)),\n+\tMK_FLOW_ITEM(PPP, sizeof(struct rte_flow_item_ppp)),\n };\n \n /** Generate flow_action[] entry. */\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 64ed7f2618..db3392bf97 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -35,6 +35,8 @@\n #include <rte_mbuf_dyn.h>\n #include <rte_meter.h>\n #include <rte_gtp.h>\n+#include <rte_l2tpv2.h>\n+#include <rte_ppp.h>\n \n #ifdef __cplusplus\n extern \"C\" {\n@@ -644,6 +646,20 @@ enum rte_flow_item_type {\n \t * @see struct rte_flow_item_flex.\n \t */\n \tRTE_FLOW_ITEM_TYPE_FLEX,\n+\n+\t/**\n+\t * Matches L2TPv2 Header.\n+\t *\n+\t * See struct rte_flow_item_l2tpv2.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_L2TPV2,\n+\n+\t/**\n+\t * Matches PPP Header.\n+\t *\n+\t * See struct rte_flow_item_ppp.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_PPP,\n };\n \n /**\n@@ -1900,6 +1916,57 @@ static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask = {\n };\n #endif\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change without prior notice\n+ *\n+ * RTE_FLOW_ITEM_TYPE_L2TPV2\n+ *\n+ * Matches L2TPv2 Header\n+ */\n+struct rte_flow_item_l2tpv2 {\n+\tstruct rte_l2tpv2_combined_msg_hdr hdr;\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TYPE_L2TPV2. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask = {\n+\t/*\n+\t * flags and version bit mask\n+\t * 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0\n+\t * T L x x S x O P x x x x V V V V\n+\t */\n+\t.hdr = {\n+\t\t.common = {\n+\t\t\t.flags_version = RTE_BE16(0xcb0f),\n+\t\t},\n+\t},\n+};\n+#endif\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change without prior notice\n+ *\n+ * RTE_FLOW_ITEM_TYPE_PPP\n+ *\n+ * Matches PPP Header\n+ */\n+struct rte_flow_item_ppp {\n+\tstruct rte_ppp_hdr hdr;\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TYPE_PPP. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_ppp rte_flow_item_ppp_mask = {\n+\t.hdr = {\n+\t\t.addr = 0xff,\n+\t\t.ctrl = 0xff,\n+\t\t.proto_id = RTE_BE16(0xffff),\n+\t}\n+};\n+#endif\n+\n /**\n * Matching pattern item definition.\n *\ndiff --git a/lib/net/meson.build b/lib/net/meson.build\nindex a4e395e9c5..e899846578 100644\n--- a/lib/net/meson.build\n+++ b/lib/net/meson.build\n@@ -19,6 +19,8 @@ headers = files(\n 'rte_higig.h',\n 'rte_ecpri.h',\n 'rte_geneve.h',\n+ 'rte_l2tpv2.h',\n+ 'rte_ppp.h',\n )\n \n sources = files(\ndiff --git a/lib/net/rte_l2tpv2.h b/lib/net/rte_l2tpv2.h\nnew file mode 100644\nindex 0000000000..4634964820\n--- /dev/null\n+++ b/lib/net/rte_l2tpv2.h\n@@ -0,0 +1,234 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Intel Corporation.\n+ */\n+\n+#ifndef _RTE_L2TPV2_H_\n+#define _RTE_L2TPV2_H_\n+\n+/**\n+ * @file\n+ *\n+ * L2TP header:\n+ *\n+ * `-0--------------------1----------------2-------------------3`\n+ *\n+ * `-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1`\n+ *\n+ * `+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+`\n+ *\n+ * `|T|L|x|x|S|x|O|P|x|x|x|x|--Ver--|-----------Length (opt)--------|`\n+ *\n+ * `+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+`\n+ *\n+ * `|-----------Tunnel ID-----------|-----------Session ID----------|`\n+ *\n+ * `+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+`\n+ *\n+ * `|-----------Ns (opt)------------|-----------Nr (opt)------------|`\n+ *\n+ * `+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+`\n+ *\n+ * `|---------Offset Size (opt)-----|---------Offset pad... (opt)`\n+ *\n+ * `+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+`\n+ *\n+ * The Type (T) bit indicates the type of message. It is set to 0 for a data\n+ * message and 1 for a control message.\n+ *\n+ * If the Length (L) bit is 1, the Length field is present. This bit MUST be\n+ * set to 1 for control messages.\n+ *\n+ * The x bits are reserved for future extensions. All reserved bits MUST\n+ * be set to 0 on outgoing messages and ignored on incoming messages.\n+ *\n+ * If the Sequence (S) bit is set to 1 the Ns and Nr fields are present.\n+ * The S bit MUST be set to 1 for control messages.\n+ *\n+ * If the Offset (O) bit is 1, the Offset Size field is present. The O\n+ * bit MUST be set to 0 for control messages.\n+ *\n+ * If the Priority (P) bit is 1, this data message should receive\n+ * preferential treatment in its local queuing and transmission.\n+ * The P bit MUST be set to 0 for control messages.\n+ *\n+ * Ver MUST be 2, indicating the version of the L2TP data message header.\n+ *\n+ * The Length field indicates the total length of the message in octets.\n+ *\n+ * Tunnel ID indicates the identifier for the control connection.\n+ *\n+ * Session ID indicates the identifier for a session within a tunnel.\n+ *\n+ * Ns indicates the sequence number for this data or control message.\n+ *\n+ * Nr indicates the sequence number expected in the next control message\n+ * to be received.\n+ *\n+ * The Offset Size field, if present, specifies the number of octets\n+ * past the L2TP header at which the payload data is expected to start.\n+ * Actual data within the offset padding is undefined. If the offset\n+ * field is present, the L2TP header ends after the last octet of the\n+ * offset padding.\n+ */\n+\n+#include <stdint.h>\n+#include <rte_byteorder.h>\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * L2TPv2 Common Header\n+ */\n+RTE_STD_C11\n+struct rte_l2tpv2_common_hdr {\n+\tunion {\n+\t\t/** header flags and protocol version */\n+\t\trte_be16_t flags_version;\n+\t\tstruct {\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\t\t\trte_be16_t t:1;\t\t/**< message Type */\n+\t\t\trte_be16_t l:1;\t\t/**< length option bit */\n+\t\t\trte_be16_t res1:2;\t/**< reserved */\n+\t\t\trte_be16_t s:1;\t\t/**< ns/nr option bit */\n+\t\t\trte_be16_t res2:1;\t/**< reserved */\n+\t\t\trte_be16_t o:1;\t\t/**< offset option bit */\n+\t\t\trte_be16_t p:1;\t\t/**< priority option bit */\n+\t\t\trte_be16_t res3:4;\t/**< reserved */\n+\t\t\trte_be16_t ver:4;\t/**< protocol version */\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\t\t\trte_be16_t ver:4;\t/**< protocol version */\n+\t\t\trte_be16_t res3:4;\t/**< reserved */\n+\t\t\trte_be16_t p:1;\t\t/**< priority option bit */\n+\t\t\trte_be16_t o:1;\t\t/**< offset option bit */\n+\t\t\trte_be16_t res2:1;\t/**< reserved */\n+\t\t\trte_be16_t s:1;\t\t/**< ns/nr option bit */\n+\t\t\trte_be16_t res1:2;\t/**< reserved */\n+\t\t\trte_be16_t l:1;\t\t/**< length option bit */\n+\t\t\trte_be16_t t:1;\t\t/**< message Type */\n+#endif\n+\t\t};\n+\t};\n+};\n+\n+/**\n+ * L2TPv2 message Header contains all options(length, ns, nr,\n+ * offset size, offset padding).\n+ */\n+struct rte_l2tpv2_msg_with_all_options {\n+\trte_be16_t length;\t\t/**< length(16) */\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+\trte_be16_t ns;\t\t\t/**< Ns(16) */\n+\trte_be16_t nr;\t\t\t/**< Nr(16) */\n+\trte_be16_t offset_size;\t\t/**< offset size(16) */\n+\tuint8_t *offset_padding;\t/**< offset padding(variable length) */\n+} __rte_packed;\n+\n+/**\n+ * L2TPv2 message Header contains all options except length(ns, nr,\n+ * offset size, offset padding).\n+ */\n+struct rte_l2tpv2_msg_without_length {\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+\trte_be16_t ns;\t\t\t/**< Ns(16) */\n+\trte_be16_t nr;\t\t\t/**< Nr(16) */\n+\trte_be16_t offset_size;\t\t/**< offset size(16) */\n+\tuint8_t *offset_padding;\t/**< offset padding(variable length) */\n+} __rte_packed;\n+\n+/**\n+ * L2TPv2 message Header contains all options except ns_nr(length,\n+ * offset size, offset padding).\n+ * Ns and Nr MUST be toghter.\n+ */\n+struct rte_l2tpv2_msg_without_ns_nr {\n+\trte_be16_t length;\t\t/**< length(16) */\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+\trte_be16_t offset_size;\t\t/**< offset size(16) */\n+\tuint8_t *offset_padding;\t/**< offset padding(variable length) */\n+};\n+\n+/**\n+ * L2TPv2 message Header contains all options except ns_nr(length, ns, nr).\n+ * offset size and offset padding MUST be toghter.\n+ */\n+struct rte_l2tpv2_msg_without_offset {\n+\trte_be16_t length;\t\t/**< length(16) */\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+\trte_be16_t ns;\t\t\t/**< Ns(16) */\n+\trte_be16_t nr;\t\t\t/**< Nr(16) */\n+};\n+\n+/**\n+ * L2TPv2 message Header contains options offset size and offset padding.\n+ */\n+struct rte_l2tpv2_msg_with_offset {\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+\trte_be16_t offset_size;\t\t/**< offset size(16) */\n+\tuint8_t *offset_padding;\t/**< offset padding(variable length) */\n+} __rte_packed;\n+\n+/**\n+ * L2TPv2 message Header contains options ns and nr.\n+ */\n+struct rte_l2tpv2_msg_with_ns_nr {\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+\trte_be16_t ns;\t\t\t/**< Ns(16) */\n+\trte_be16_t nr;\t\t\t/**< Nr(16) */\n+};\n+\n+/**\n+ * L2TPv2 message Header contains option length.\n+ */\n+struct rte_l2tpv2_msg_with_length {\n+\trte_be16_t length;\t\t/**< length(16) */\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+};\n+\n+/**\n+ * L2TPv2 message Header without all options.\n+ */\n+struct rte_l2tpv2_msg_without_all_options {\n+\trte_be16_t tunnel_id;\t\t/**< tunnel ID(16) */\n+\trte_be16_t session_id;\t\t/**< session ID(16) */\n+};\n+\n+/**\n+ * L2TPv2 Combined Message Header Format: Common Header + Options\n+ */\n+RTE_STD_C11\n+struct rte_l2tpv2_combined_msg_hdr {\n+\tstruct rte_l2tpv2_common_hdr common; /**< common header */\n+\tunion {\n+\t\t/** header with all options */\n+\t\tstruct rte_l2tpv2_msg_with_all_options type0;\n+\t\t/** header with all options except length */\n+\t\tstruct rte_l2tpv2_msg_without_length type1;\n+\t\t/** header with all options except ns/nr */\n+\t\tstruct rte_l2tpv2_msg_without_ns_nr type2;\n+\t\t/** header with all options except offset */\n+\t\tstruct rte_l2tpv2_msg_without_offset type3;\n+\t\t/** header with offset options */\n+\t\tstruct rte_l2tpv2_msg_with_offset type4;\n+\t\t/** header with ns/nr options */\n+\t\tstruct rte_l2tpv2_msg_with_ns_nr type5;\n+\t\t/** header with length option */\n+\t\tstruct rte_l2tpv2_msg_with_length type6;\n+\t\t/** header without all options */\n+\t\tstruct rte_l2tpv2_msg_without_all_options type7;\n+\t};\n+} __rte_packed;\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _RTE_L2TPV2_H_ */\ndiff --git a/lib/net/rte_ppp.h b/lib/net/rte_ppp.h\nnew file mode 100644\nindex 0000000000..7b86ac4363\n--- /dev/null\n+++ b/lib/net/rte_ppp.h\n@@ -0,0 +1,34 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Intel Corporation.\n+ */\n+\n+#ifndef _RTE_PPP_H_\n+#define _RTE_PPP_H_\n+\n+/**\n+ * @file\n+ *\n+ * PPP headers definition.\n+ */\n+\n+#include <stdint.h>\n+#include <rte_byteorder.h>\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * PPP Header\n+ */\n+struct rte_ppp_hdr {\n+\tuint8_t addr; /**< PPP address(8) */\n+\tuint8_t ctrl; /**< PPP control(8) */\n+\trte_be16_t proto_id; /**< PPP protocol identifier(16) */\n+} __rte_packed;\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _RTE_PPP_H_ */\n", "prefixes": [ "v9", "1/3" ] }{ "id": 102586, "url": "