Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/66622/?format=api
http://patches.dpdk.org/api/patches/66622/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200313020806.21654-3-wei.zhao1@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": "<20200313020806.21654-3-wei.zhao1@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200313020806.21654-3-wei.zhao1@intel.com", "date": "2020-03-13T02:08:01", "name": "[2/7] net/ice: support for more PPPoE input set", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "25cf1ae660d555ec39840c8bff738a0e57ce3d76", "submitter": { "id": 495, "url": "http://patches.dpdk.org/api/people/495/?format=api", "name": "Zhao1, Wei", "email": "wei.zhao1@intel.com" }, "delegate": { "id": 31221, "url": "http://patches.dpdk.org/api/users/31221/?format=api", "username": "yexl", "first_name": "xiaolong", "last_name": "ye", "email": "xiaolong.ye@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200313020806.21654-3-wei.zhao1@intel.com/mbox/", "series": [ { "id": 8900, "url": "http://patches.dpdk.org/api/series/8900/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8900", "date": "2020-03-13T02:07:59", "name": "add switch filter support for intel DCF", "version": 1, "mbox": "http://patches.dpdk.org/series/8900/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/66622/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/66622/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AFCE3A0567;\n\tFri, 13 Mar 2020 03:29:00 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BA2EE1C044;\n\tFri, 13 Mar 2020 03:28:48 +0100 (CET)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by dpdk.org (Postfix) with ESMTP id 1CC6D1C02B\n for <dev@dpdk.org>; Fri, 13 Mar 2020 03:28:44 +0100 (CET)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Mar 2020 19:28:45 -0700", "from unknown (HELO localhost.localdomain.bj.intel.com)\n ([172.16.182.123])\n by fmsmga004.fm.intel.com with ESMTP; 12 Mar 2020 19:28:43 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,546,1574150400\"; d=\"scan'208\";a=\"266587172\"", "From": "Wei Zhao <wei.zhao1@intel.com>", "To": "dev@dpdk.org", "Cc": "qi.z.zhang@intel.com, xiaolong.ye@intel.com,\n Wei Zhao <wei.zhao1@intel.com>", "Date": "Fri, 13 Mar 2020 10:08:01 +0800", "Message-Id": "<20200313020806.21654-3-wei.zhao1@intel.com>", "X-Mailer": "git-send-email 2.19.1", "In-Reply-To": "<20200313020806.21654-1-wei.zhao1@intel.com>", "References": "<20200313020806.21654-1-wei.zhao1@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 2/7] net/ice: support for more PPPoE input set", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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": "This patch add more support for PPPoE packet,\nit enable swicth filter to direct PPPoE packet base on\nsession id and PPP protocol type.\n\nSigned-off-by: Wei Zhao <wei.zhao1@intel.com>\n---\n config/common_linux | 1 +\n drivers/net/ice/ice_generic_flow.c | 13 +++++\n drivers/net/ice/ice_generic_flow.h | 9 ++++\n drivers/net/ice/ice_switch_filter.c | 82 +++++++++++++++++++++++++++--\n 4 files changed, 100 insertions(+), 5 deletions(-)", "diff": "diff --git a/config/common_linux b/config/common_linux\nindex 816810671..c6630d2bd 100644\n--- a/config/common_linux\n+++ b/config/common_linux\n@@ -8,6 +8,7 @@ CONFIG_RTE_EXEC_ENV_LINUX=y\n CONFIG_RTE_EXEC_ENV_LINUXAPP=y\n \n CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y\n+CONFIG_RTE_EAL_IGB_UIO=y\n CONFIG_RTE_EAL_VFIO=y\n CONFIG_RTE_LIBRTE_KNI=y\n CONFIG_RTE_LIBRTE_PMD_KNI=y\ndiff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c\nindex 38ac799d8..af0fff814 100644\n--- a/drivers/net/ice/ice_generic_flow.c\n+++ b/drivers/net/ice/ice_generic_flow.c\n@@ -1122,12 +1122,25 @@ enum rte_flow_item_type pattern_eth_pppoes[] = {\n \tRTE_FLOW_ITEM_TYPE_PPPOES,\n \tRTE_FLOW_ITEM_TYPE_END,\n };\n+enum rte_flow_item_type pattern_eth_pppoes_proto[] = {\n+\tRTE_FLOW_ITEM_TYPE_ETH,\n+\tRTE_FLOW_ITEM_TYPE_PPPOES,\n+\tRTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID,\n+\tRTE_FLOW_ITEM_TYPE_END,\n+};\n enum rte_flow_item_type pattern_eth_vlan_pppoes[] = {\n \tRTE_FLOW_ITEM_TYPE_ETH,\n \tRTE_FLOW_ITEM_TYPE_VLAN,\n \tRTE_FLOW_ITEM_TYPE_PPPOES,\n \tRTE_FLOW_ITEM_TYPE_END,\n };\n+enum rte_flow_item_type pattern_eth_vlan_pppoes_proto[] = {\n+\tRTE_FLOW_ITEM_TYPE_ETH,\n+\tRTE_FLOW_ITEM_TYPE_VLAN,\n+\tRTE_FLOW_ITEM_TYPE_PPPOES,\n+\tRTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID,\n+\tRTE_FLOW_ITEM_TYPE_END,\n+};\n enum rte_flow_item_type pattern_eth_qinq_pppoes[] = {\n \tRTE_FLOW_ITEM_TYPE_ETH,\n \tRTE_FLOW_ITEM_TYPE_VLAN,\ndiff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h\nindex adc30ee2a..f1139c690 100644\n--- a/drivers/net/ice/ice_generic_flow.h\n+++ b/drivers/net/ice/ice_generic_flow.h\n@@ -30,6 +30,7 @@\n #define ICE_PROT_VXLAN (1ULL << 19)\n #define ICE_PROT_NVGRE (1ULL << 20)\n #define ICE_PROT_GTPU (1ULL << 21)\n+#define ICE_PROT_PPPoE (1ULL << 22)\n \n /* field */\n \n@@ -49,6 +50,8 @@\n #define ICE_NVGRE_TNI (1ULL << 50)\n #define ICE_GTPU_TEID (1ULL << 49)\n #define ICE_GTPU_QFI (1ULL << 48)\n+#define ICE_PPPOE_SESSION (1ULL << 47)\n+#define ICE_PPPOE_PROTO (1ULL << 46)\n \n /* input set */\n \n@@ -177,6 +180,10 @@\n \t(ICE_PROT_GTPU | ICE_GTPU_TEID)\n #define ICE_INSET_GTPU_QFI \\\n \t(ICE_PROT_GTPU | ICE_GTPU_QFI)\n+#define ICE_INSET_PPPOE_SESSION \\\n+\t(ICE_PROT_PPPoE | ICE_PPPOE_SESSION)\n+#define ICE_INSET_PPPOE_PROTO \\\n+\t(ICE_PROT_PPPoE | ICE_PPPOE_PROTO)\n \n /* empty pattern */\n extern enum rte_flow_item_type pattern_empty[];\n@@ -349,7 +356,9 @@ extern enum rte_flow_item_type pattern_eth_pppoed[];\n extern enum rte_flow_item_type pattern_eth_vlan_pppoed[];\n extern enum rte_flow_item_type pattern_eth_qinq_pppoed[];\n extern enum rte_flow_item_type pattern_eth_pppoes[];\n+extern enum rte_flow_item_type pattern_eth_pppoes_proto[];\n extern enum rte_flow_item_type pattern_eth_vlan_pppoes[];\n+extern enum rte_flow_item_type pattern_eth_vlan_pppoes_proto[];\n extern enum rte_flow_item_type pattern_eth_qinq_pppoes[];\n extern enum rte_flow_item_type pattern_eth_pppoes_ipv4[];\n extern enum rte_flow_item_type pattern_eth_vlan_pppoes_ipv4[];\ndiff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c\nindex c55e44e1a..39b5c7266 100644\n--- a/drivers/net/ice/ice_switch_filter.c\n+++ b/drivers/net/ice/ice_switch_filter.c\n@@ -87,7 +87,11 @@\n \tICE_INSET_TUN_IPV4_TOS)\n #define ICE_SW_INSET_MAC_PPPOE ( \\\n \tICE_INSET_VLAN_OUTER | ICE_INSET_VLAN_INNER | \\\n-\tICE_INSET_DMAC | ICE_INSET_ETHERTYPE)\n+\tICE_INSET_DMAC | ICE_INSET_ETHERTYPE | ICE_INSET_PPPOE_SESSION)\n+#define ICE_SW_INSET_MAC_PPPOE_PROTO ( \\\n+\tICE_INSET_VLAN_OUTER | ICE_INSET_VLAN_INNER | \\\n+\tICE_INSET_DMAC | ICE_INSET_ETHERTYPE | ICE_INSET_PPPOE_SESSION | \\\n+\tICE_INSET_PPPOE_PROTO)\n \n struct sw_meta {\n \tstruct ice_adv_lkup_elem *list;\n@@ -135,6 +139,10 @@ ice_pattern_match_item ice_switch_pattern_dist_comms[] = {\n \t\t\tICE_SW_INSET_MAC_PPPOE, ICE_INSET_NONE},\n \t{pattern_eth_vlan_pppoes,\n \t\t\tICE_SW_INSET_MAC_PPPOE, ICE_INSET_NONE},\n+\t{pattern_eth_pppoes_proto,\n+\t\t\tICE_SW_INSET_MAC_PPPOE_PROTO, ICE_INSET_NONE},\n+\t{pattern_eth_vlan_pppoes_proto,\n+\t\t\tICE_SW_INSET_MAC_PPPOE_PROTO, ICE_INSET_NONE},\n };\n \n static struct\n@@ -316,12 +324,15 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],\n \tconst struct rte_flow_item_vxlan *vxlan_spec, *vxlan_mask;\n \tconst struct rte_flow_item_vlan *vlan_spec, *vlan_mask;\n \tconst struct rte_flow_item_pppoe *pppoe_spec, *pppoe_mask;\n+\tconst struct rte_flow_item_pppoe_proto_id *pppoe_proto_spec,\n+\t\t\t\t*pppoe_proto_mask;\n \tuint8_t ipv6_addr_mask[16] = {\n \t\t0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,\n \t\t0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\n \tuint64_t input_set = ICE_INSET_NONE;\n \tuint16_t j, t = 0;\n \tuint16_t tunnel_valid = 0;\n+\tuint16_t pppoe_valid = 0;\n \n \n \tfor (item = pattern; item->type !=\n@@ -885,14 +896,75 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],\n \t\t\tpppoe_mask = item->mask;\n \t\t\t/* Check if PPPoE item is used to describe protocol.\n \t\t\t * If yes, both spec and mask should be NULL.\n+\t\t\t * If no, both spec and mask shouldn't be NULL.\n \t\t\t */\n-\t\t\tif (pppoe_spec || pppoe_mask) {\n+\t\t\tif ((!pppoe_spec && pppoe_mask) ||\n+\t\t\t\t(pppoe_spec && !pppoe_mask)) {\n \t\t\t\trte_flow_error_set(error, EINVAL,\n-\t\t\t\t\t RTE_FLOW_ERROR_TYPE_ITEM,\n-\t\t\t\t\t item,\n-\t\t\t\t\t \"Invalid pppoe item\");\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\titem,\n+\t\t\t\t\t\"Invalid pppoe item\");\n \t\t\t\treturn 0;\n \t\t\t}\n+\t\t\tif (pppoe_spec && pppoe_mask) {\n+\t\t\t\t/* Check pppoe mask and update input set */\n+\t\t\t\tif (pppoe_mask->length ||\n+\t\t\t\t\tpppoe_mask->code ||\n+\t\t\t\t\tpppoe_mask->version_type) {\n+\t\t\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t\titem,\n+\t\t\t\t\t\t\"Invalid pppoe mask\");\n+\t\t\t\t\treturn 0;\n+\t\t\t\t}\n+\t\t\t\tlist[t].type = ICE_PPPOE;\n+\t\t\t\tif (pppoe_mask->session_id == UINT16_MAX) {\n+\t\t\t\t\tlist[t].h_u.pppoe_hdr.session_id =\n+\t\t\t\t\t\tpppoe_spec->session_id;\n+\t\t\t\t\tlist[t].m_u.pppoe_hdr.session_id =\n+\t\t\t\t\t\tUINT16_MAX;\n+\t\t\t\t\tinput_set |= ICE_INSET_PPPOE_SESSION;\n+\t\t\t\t}\n+\t\t\t\tt++;\n+\t\t\t\tpppoe_valid = 1;\n+\t\t\t} else if (!pppoe_spec && !pppoe_mask) {\n+\t\t\t\tlist[t].type = ICE_PPPOE;\n+\t\t\t}\n+\n+\t\t\tbreak;\n+\n+\t\tcase RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID:\n+\t\t\tpppoe_proto_spec = item->spec;\n+\t\t\tpppoe_proto_mask = item->mask;\n+\t\t\t/* Check if PPPoE optional proto_id item\n+\t\t\t * is used to describe protocol.\n+\t\t\t * If yes, both spec and mask should be NULL.\n+\t\t\t * If no, both spec and mask shouldn't be NULL.\n+\t\t\t */\n+\t\t\tif ((!pppoe_proto_spec && pppoe_proto_mask) ||\n+\t\t\t\t(pppoe_proto_spec && !pppoe_proto_mask)) {\n+\t\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\titem,\n+\t\t\t\t\t\"Invalid pppoe proto item\");\n+\t\t\t\treturn 0;\n+\t\t\t}\n+\t\t\tif (pppoe_proto_spec && pppoe_proto_mask) {\n+\t\t\t\tif (pppoe_valid)\n+\t\t\t\t\tt--;\n+\t\t\t\tlist[t].type = ICE_PPPOE;\n+\t\t\t\tif (pppoe_proto_mask->proto_id == UINT16_MAX) {\n+\t\t\t\t\tlist[t].h_u.pppoe_hdr.ppp_prot_id =\n+\t\t\t\t\t\tpppoe_proto_spec->proto_id;\n+\t\t\t\t\tlist[t].m_u.pppoe_hdr.ppp_prot_id =\n+\t\t\t\t\t\tUINT16_MAX;\n+\t\t\t\t\tinput_set |= ICE_INSET_PPPOE_PROTO;\n+\t\t\t\t}\n+\t\t\t\tt++;\n+\t\t\t} else if (!pppoe_proto_spec && !pppoe_proto_mask) {\n+\t\t\t\tlist[t].type = ICE_PPPOE;\n+\t\t\t}\n+\n \t\t\tbreak;\n \n \t\tcase RTE_FLOW_ITEM_TYPE_VOID:\n", "prefixes": [ "2/7" ] }{ "id": 66622, "url": "