Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/126594/?format=api
http://patchwork.dpdk.org/api/patches/126594/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230427062001.478032-28-qiming.yang@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20230427062001.478032-28-qiming.yang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230427062001.478032-28-qiming.yang@intel.com", "date": "2023-04-27T06:19:58", "name": "[27/30] net/ice/base: support inner etype in switchdev", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e82d11e16a9c7a147b079fda25bbccbe5d67f2d4", "submitter": { "id": 522, "url": "http://patchwork.dpdk.org/api/people/522/?format=api", "name": "Qiming Yang", "email": "qiming.yang@intel.com" }, "delegate": { "id": 1540, "url": "http://patchwork.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230427062001.478032-28-qiming.yang@intel.com/mbox/", "series": [ { "id": 27885, "url": "http://patchwork.dpdk.org/api/series/27885/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=27885", "date": "2023-04-27T06:19:31", "name": "net/ice/base: share code update", "version": 1, "mbox": "http://patchwork.dpdk.org/series/27885/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/126594/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/126594/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 1A4CE42A08;\n\tThu, 27 Apr 2023 08:40:50 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 16A1043006;\n\tThu, 27 Apr 2023 08:38:36 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 73FEB42FEE\n for <dev@dpdk.org>; Thu, 27 Apr 2023 08:38:33 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Apr 2023 23:38:33 -0700", "from dpdk-qiming3.sh.intel.com ([10.67.111.4])\n by fmsmga002.fm.intel.com with ESMTP; 26 Apr 2023 23:38:30 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1682577513; x=1714113513;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=7iz18wA8gQyQAUWOymaT+xkI1ArrD48thzLvfe4poxc=;\n b=gT2UiYwELN7hERzgDG+dE63tSTrUMD4Us5Zu/vicj3ulQF9HpDZ8kgwn\n 4yjUxa5Nfk1GXEjhRF9+NNlwUcC8Y2nB4UXj8q7c0zrVF3/g0SErXlccO\n 1X1bvzDkswKwJmhSOZDag4QHsMMVSPdpP2KNguN71HGmgiOoVZvmxHSdc\n FhNKTNaJyf5pjUBTnGoOeuR8Vx8xcyJPnDm4WM+B/nwPduN/Xn8wmF1hh\n fjgys6a3MMms/muZoSTetEb4WHKTLkgz8dU2X3qJLdunZ59hf/kUj/GzU\n K+lsrNnsW28H18PWUvxGX0pyWbegw8hE+U+Wf6II1H+hXjelLEXIfBjO+ Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10692\"; a=\"375324408\"", "E=Sophos;i=\"5.99,230,1677571200\"; d=\"scan'208\";a=\"375324408\"", "E=McAfee;i=\"6600,9927,10692\"; a=\"805845884\"", "E=Sophos;i=\"5.99,230,1677571200\"; d=\"scan'208\";a=\"805845884\"" ], "X-ExtLoop1": "1", "From": "Qiming Yang <qiming.yang@intel.com>", "To": "dev@dpdk.org", "Cc": "qi.z.zhang@intel.com, Qiming Yang <qiming.yang@intel.com>,\n Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@intel.com>", "Subject": "[PATCH 27/30] net/ice/base: support inner etype in switchdev", "Date": "Thu, 27 Apr 2023 06:19:58 +0000", "Message-Id": "<20230427062001.478032-28-qiming.yang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230427062001.478032-1-qiming.yang@intel.com>", "References": "<20230427062001.478032-1-qiming.yang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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" }, "content": "Enable support for adding TC rules that filter on the inner\nEtherType field of tunneled packet headers.\n\nSigned-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@intel.com>\nSigned-off-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 32 ++++++++++++++++++++-----------\n 1 file changed, 21 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 37c192fb87..5061af5d79 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -49,6 +49,7 @@ static const struct ice_dummy_pkt_offsets dummy_gre_tcp_packet_offsets[] = {\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_NVGRE,\t\t34 },\n \t{ ICE_MAC_IL,\t\t42 },\n+\t{ ICE_ETYPE_IL,\t\t54 },\n \t{ ICE_IPV4_IL,\t\t56 },\n \t{ ICE_TCP_IL,\t\t76 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -73,7 +74,8 @@ static const u8 dummy_gre_tcp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00,\t/* ICE_MAC_IL 42 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_IL 54 */\n \n \t0x45, 0x00, 0x00, 0x14,\t/* ICE_IPV4_IL 56 */\n \t0x00, 0x00, 0x00, 0x00,\n@@ -94,6 +96,7 @@ static const struct ice_dummy_pkt_offsets dummy_gre_udp_packet_offsets[] = {\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_NVGRE,\t\t34 },\n \t{ ICE_MAC_IL,\t\t42 },\n+\t{ ICE_ETYPE_IL,\t\t54 },\n \t{ ICE_IPV4_IL,\t\t56 },\n \t{ ICE_UDP_ILOS,\t\t76 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -118,7 +121,8 @@ static const u8 dummy_gre_udp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00,\t/* ICE_MAC_IL 42 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_IL 54 */\n \n \t0x45, 0x00, 0x00, 0x14,\t/* ICE_IPV4_IL 56 */\n \t0x00, 0x00, 0x00, 0x00,\n@@ -167,7 +171,8 @@ static const u8 dummy_udp_tun_tcp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 50 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_IL 62*/\n \n \t0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_IL 64 */\n \t0x00, 0x01, 0x00, 0x00,\n@@ -191,6 +196,7 @@ static const struct ice_dummy_pkt_offsets dummy_udp_tun_udp_packet_offsets[] = {\n \t{ ICE_GENEVE,\t\t42 },\n \t{ ICE_VXLAN_GPE,\t42 },\n \t{ ICE_MAC_IL,\t\t50 },\n+\t{ ICE_ETYPE_IL,\t\t62 },\n \t{ ICE_IPV4_IL,\t\t64 },\n \t{ ICE_UDP_ILOS,\t\t84 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -218,7 +224,8 @@ static const u8 dummy_udp_tun_udp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_IL 50 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_IL 62 */\n \n \t0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_IL 64 */\n \t0x00, 0x01, 0x00, 0x00,\n@@ -2216,6 +2223,7 @@ static struct ice_prof_type_entry ice_prof_type_tbl[ICE_GTPU_PROFILE] = {\n /**\n * ice_get_tun_type_for_recipe - get tunnel type for the recipe\n * @rid: recipe ID that we are populating\n+ * @vlan: flag of vlan protocol\n */\n static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid, bool vlan)\n {\n@@ -2224,7 +2232,8 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid, bool vlan)\n \tu8 pppoe_profile[7] = {34, 35, 36, 37, 38, 39, 40};\n \tu8 non_tun_profile[6] = {4, 5, 6, 7, 8, 9};\n \tenum ice_sw_tunnel_type tun_type;\n-\tu16 i, j, k, profile_num = 0;\n+\tu16 i, j, profile_num = 0;\n+\tu16 k;\n \tbool non_tun_valid = false;\n \tbool pppoe_valid = false;\n \tbool vxlan_valid = false;\n@@ -3355,6 +3364,8 @@ ice_aq_add_update_mir_rule(struct ice_hw *hw, u16 rule_type, u16 dest_vsi,\n \t\t\telse /* remove VSI from mirror rule */\n \t\t\t\tmr_list[i] = CPU_TO_LE16(id);\n \t\t}\n+\n+\t\tdesc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);\n \t}\n \n \tcmd = &desc.params.add_update_rule;\n@@ -6984,6 +6995,7 @@ static const struct ice_prot_ext_tbl_entry ice_prot_ext[ICE_PROTOCOL_LAST] = {\n \t{ ICE_MAC_OFOS,\t\t{ 0, 2, 4, 6, 8, 10, 12 } },\n \t{ ICE_MAC_IL,\t\t{ 0, 2, 4, 6, 8, 10, 12 } },\n \t{ ICE_ETYPE_OL,\t\t{ 0 } },\n+\t{ ICE_ETYPE_IL,\t\t{ 0 } },\n \t{ ICE_VLAN_OFOS,\t{ 2, 0 } },\n \t{ ICE_IPV4_OFOS,\t{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },\n \t{ ICE_IPV4_IL,\t\t{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },\n@@ -7021,6 +7033,7 @@ static struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {\n \t{ ICE_MAC_OFOS,\t\tICE_MAC_OFOS_HW },\n \t{ ICE_MAC_IL,\t\tICE_MAC_IL_HW },\n \t{ ICE_ETYPE_OL,\t\tICE_ETYPE_OL_HW },\n+\t{ ICE_ETYPE_IL,\t\tICE_ETYPE_IL_HW },\n \t{ ICE_VLAN_OFOS,\tICE_VLAN_OL_HW },\n \t{ ICE_IPV4_OFOS,\tICE_IPV4_OFOS_HW },\n \t{ ICE_IPV4_IL,\t\tICE_IPV4_IL_HW },\n@@ -7051,6 +7064,8 @@ static struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {\n * ice_find_recp - find a recipe\n * @hw: pointer to the hardware structure\n * @lkup_exts: extension sequence to match\n+ * @tun_type: tunnel type of switch filter\n+ * @priority: priority of switch filter\n *\n * Returns index of matching recipe, or ICE_MAX_NUM_RECIPES if not found.\n */\n@@ -8961,13 +8976,11 @@ ice_fill_adv_packet_tun(struct ice_hw *hw, enum ice_sw_tunnel_type tun_type,\n \t\tif (!ice_get_open_tunnel_port(hw, TNL_VXLAN, &open_port))\n \t\t\treturn ICE_ERR_CFG;\n \t\tbreak;\n-\n \tcase ICE_SW_TUN_GENEVE:\n \tcase ICE_SW_TUN_GENEVE_VLAN:\n \t\tif (!ice_get_open_tunnel_port(hw, TNL_GENEVE, &open_port))\n \t\t\treturn ICE_ERR_CFG;\n \t\tbreak;\n-\n \tdefault:\n \t\t/* Nothing needs to be done for this tunnel type */\n \t\treturn ICE_SUCCESS;\n@@ -9579,7 +9592,6 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,\n err_ice_add_adv_rule:\n \tif (status && rinfo->sw_act.fltr_act == ICE_SET_MARK)\n \t\tice_free_sw_marker_lg(hw, lg_act_id, rinfo->sw_act.markid);\n-\n \tif (status && adv_fltr) {\n \t\tice_free(hw, adv_fltr->lkups);\n \t\tice_free(hw, adv_fltr);\n@@ -9861,8 +9873,7 @@ enum ice_status ice_rem_adv_rule_for_vsi(struct ice_hw *hw, u16 vsi_handle)\n \t\t\t\tif (!map_info)\n \t\t\t\t\tcontinue;\n \n-\t\t\t\tif (!ice_is_bit_set(map_info->vsi_map,\n-\t\t\t\t\t\t vsi_handle))\n+\t\t\t\tif (!ice_is_bit_set(map_info->vsi_map, vsi_handle))\n \t\t\t\t\tcontinue;\n \t\t\t} else if (rinfo.sw_act.vsi_handle != vsi_handle) {\n \t\t\t\tcontinue;\n@@ -9871,7 +9882,6 @@ enum ice_status ice_rem_adv_rule_for_vsi(struct ice_hw *hw, u16 vsi_handle)\n \t\t\trinfo.sw_act.vsi_handle = vsi_handle;\n \t\t\tstatus = ice_rem_adv_rule(hw, list_itr->lkups,\n \t\t\t\t\t\t list_itr->lkups_cnt, &rinfo);\n-\n \t\t\tif (status)\n \t\t\t\treturn status;\n \t\t}\n", "prefixes": [ "27/30" ] }{ "id": 126594, "url": "