Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/95719/?format=api
https://patches.dpdk.org/api/patches/95719/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210713023530.1732-1-alvinx.zhang@intel.com/", "project": { "id": 1, "url": "https://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": "<20210713023530.1732-1-alvinx.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210713023530.1732-1-alvinx.zhang@intel.com", "date": "2021-07-13T02:35:30", "name": "[v2] net/ice/base: support MPLS ethertype switch filter", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9e56bc231ac0e38279dd9925ad7d0e9e81ed925e", "submitter": { "id": 1398, "url": "https://patches.dpdk.org/api/people/1398/?format=api", "name": "Alvin Zhang", "email": "alvinx.zhang@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210713023530.1732-1-alvinx.zhang@intel.com/mbox/", "series": [ { "id": 17782, "url": "https://patches.dpdk.org/api/series/17782/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17782", "date": "2021-07-13T02:35:30", "name": "[v2] net/ice/base: support MPLS ethertype switch filter", "version": 2, "mbox": "https://patches.dpdk.org/series/17782/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/95719/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/95719/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 C1A9FA0C43;\n\tTue, 13 Jul 2021 04:35:41 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3B65740DDE;\n\tTue, 13 Jul 2021 04:35:41 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 09EA24069E\n for <dev@dpdk.org>; Tue, 13 Jul 2021 04:35:39 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Jul 2021 19:35:37 -0700", "from shwdenpg235.ccr.corp.intel.com ([10.253.106.22])\n by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Jul 2021 19:35:36 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10043\"; a=\"207069218\"", "E=Sophos;i=\"5.84,235,1620716400\"; d=\"scan'208\";a=\"207069218\"", "E=Sophos;i=\"5.84,235,1620716400\"; d=\"scan'208\";a=\"561955424\"" ], "From": "Alvin Zhang <alvinx.zhang@intel.com>", "To": "qi.z.zhang@intel.com", "Cc": "dev@dpdk.org,\n\tAlvin Zhang <alvinx.zhang@intel.com>", "Date": "Tue, 13 Jul 2021 10:35:30 +0800", "Message-Id": "<20210713023530.1732-1-alvinx.zhang@intel.com>", "X-Mailer": "git-send-email 2.21.0.windows.1", "In-Reply-To": "<20210329054923.11424-1-alvinx.zhang@intel.com>", "References": "<20210329054923.11424-1-alvinx.zhang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2] net/ice/base: support MPLS ethertype switch\n filter", "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": "Add MPLS training packet and offsets.\nAdd check to identify MPLS ethertype filters.\n\nFor example:\ntestpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 \\\n type is 0x8847 / end actions queue index 2 / end\n\nThis flow will result in all the matched ingress packets be\nforwarded to queue 2.\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 31 ++++++++++++++++++++++++++++++-\n 1 file changed, 30 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 229b355..5926635 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -16,6 +16,7 @@\n #define ICE_TCP_PROTO_ID\t\t0x06\n #define ICE_GTPU_PROFILE\t\t24\n #define ICE_ETH_P_8021Q\t\t\t0x8100\n+#define ICE_MPLS_ETHER_ID\t\t0x8847\n \n /* Dummy ethernet header needed in the ice_aqc_sw_rules_elem\n * struct to configure any switch filter rules.\n@@ -320,6 +321,25 @@ struct ice_dummy_pkt_offsets {\n \t0x00, 0x00,\t/* 2 bytes for 4 byte alignment */\n };\n \n+/* offset info for MAC + MPLS dummy packet */\n+static const struct ice_dummy_pkt_offsets dummy_mpls_packet_offsets[] = {\n+\t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n+\t{ ICE_PROTOCOL_LAST,\t0 },\n+};\n+\n+/* Dummy packet for MAC + MPLS */\n+static const u8 dummy_mpls_packet[] = {\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x88, 0x47,\t\t/* ICE_ETYPE_OL 12 */\n+\t0x00, 0x00, 0x01, 0x00,\n+\n+\t0x00, 0x00,\t/* 2 bytes for 4 byte alignment */\n+};\n+\n /* offset info for MAC + VLAN (C-tag, 802.1Q) + IPv4 + TCP dummy packet */\n static const struct ice_dummy_pkt_offsets dummy_vlan_tcp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n@@ -7857,7 +7877,7 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)\n \t\t const struct ice_dummy_pkt_offsets **offsets)\n {\n \tbool tcp = false, udp = false, ipv6 = false, vlan = false;\n-\tbool gre = false;\n+\tbool gre = false, mpls = false;\n \tu16 i;\n \n \tfor (i = 0; i < lkups_cnt; i++) {\n@@ -7893,6 +7913,11 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)\n \t\t\t lkups[i].m_u.ipv4_hdr.protocol ==\n \t\t\t\t0xFF)\n \t\t\ttcp = true;\n+\t\telse if (lkups[i].type == ICE_ETYPE_OL &&\n+\t\t\t lkups[i].h_u.ethertype.ethtype_id ==\n+\t\t\t\tCPU_TO_BE16(ICE_MPLS_ETHER_ID) &&\n+\t\t\t lkups[i].m_u.ethertype.ethtype_id == 0xFFFF)\n+\t\t\tmpls = true;\n \t}\n \n \tif ((tun_type == ICE_SW_TUN_AND_NON_TUN_QINQ ||\n@@ -8263,6 +8288,10 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)\n \t\t*pkt = dummy_vlan_tcp_packet;\n \t\t*pkt_len = sizeof(dummy_vlan_tcp_packet);\n \t\t*offsets = dummy_vlan_tcp_packet_offsets;\n+\t} else if (mpls) {\n+\t\t*pkt = dummy_mpls_packet;\n+\t\t*pkt_len = sizeof(dummy_mpls_packet);\n+\t\t*offsets = dummy_mpls_packet_offsets;\n \t} else {\n \t\t*pkt = dummy_tcp_packet;\n \t\t*pkt_len = sizeof(dummy_tcp_packet);\n", "prefixes": [ "v2" ] }{ "id": 95719, "url": "