Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/127003/?format=api
http://patches.dpdk.org/api/patches/127003/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230518151638.1207021-10-qiming.yang@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": "<20230518151638.1207021-10-qiming.yang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230518151638.1207021-10-qiming.yang@intel.com", "date": "2023-05-18T15:16:27", "name": "[v2,09/20] net/ice/base: remove direction metadata for switchdev", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "e95088f5aebbaf7e85f2088bbce465051611c74d", "submitter": { "id": 522, "url": "http://patches.dpdk.org/api/people/522/?format=api", "name": "Qiming Yang", "email": "qiming.yang@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230518151638.1207021-10-qiming.yang@intel.com/mbox/", "series": [ { "id": 28063, "url": "http://patches.dpdk.org/api/series/28063/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28063", "date": "2023-05-18T15:16:18", "name": "net/ice/base: code update", "version": 2, "mbox": "http://patches.dpdk.org/series/28063/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/127003/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/127003/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 A3C4642AF1;\n\tThu, 18 May 2023 17:35:38 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2398542D69;\n\tThu, 18 May 2023 17:34:36 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 98AD44014F\n for <dev@dpdk.org>; Thu, 18 May 2023 17:34:34 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 May 2023 08:34:34 -0700", "from dpdk-qiming3.sh.intel.com ([10.67.111.4])\n by fmsmga007.fm.intel.com with ESMTP; 18 May 2023 08:34:32 -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=1684424074; x=1715960074;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=to6zhHg0jRoT+E/JoMbGJ6b85GGWHkpT1jAR+svra+4=;\n b=Umn4DIRjzA09t2zYXRR6b3jmlg7VDnBugmrNZFaHgLxit453unCD4zxe\n Y9hfZTT8FQvO4P5v4SoVcFqJjUfVt77S6+Ce8dJNj5XI1cT6rL/wS+Jcb\n IosIpVeZXI9B0UKatRYS7Saoe6M/s7Cpts2Ga3JQ3Am1AI/gEUveVx/So\n lapL/qqviyKmQju/ZKzyFiwWlXK9LQ1vPAQyzUI+XpeGWTeUvEzeJMczS\n tb8YEcWmC5KK5yv3kO2EkTFTJuZCFiL/wbtInD5x6dhwyXJmdkWVYbRIa\n hMgiC27KZRhVcvVeyPBUTvzdBHpOqY8A9o0kG+7GSJjZZ3dL5Jt2ukgg2 g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10714\"; a=\"341527694\"", "E=Sophos;i=\"5.99,285,1677571200\"; d=\"scan'208\";a=\"341527694\"", "E=McAfee;i=\"6600,9927,10714\"; a=\"705235115\"", "E=Sophos;i=\"5.99,285,1677571200\"; d=\"scan'208\";a=\"705235115\"" ], "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 Marcin Szycik <marcin.szycik@intel.com>", "Subject": "[PATCH v2 09/20] net/ice/base: remove direction metadata for\n switchdev", "Date": "Thu, 18 May 2023 15:16:27 +0000", "Message-Id": "<20230518151638.1207021-10-qiming.yang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230518151638.1207021-1-qiming.yang@intel.com>", "References": "<20230427062001.478032-1-qiming.yang@intel.com>\n <20230518151638.1207021-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": "ICE_SW_TUN_AND_NON_TUN tunnel type is used by switchdev for default MAC\nrules. Currently a \"special word\" is added to recipes for such tunnels,\nspecifying that rule should work only in ingress direction. Because of\nthis, all egress traffic from VF is being dropped.\n\nTo fix that, add a field add_dir_lkup to ice_adv_rule_info struct (will\nbe set in CORE before calling ice_add_adv_rule()).\n\nSigned-off-by: Marcin Szycik <marcin.szycik@intel.com>\nSigned-off-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 20 +++++++++++++-------\n drivers/net/ice/base/ice_switch.h | 1 +\n 2 files changed, 14 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex e290a845bc..c5951b5d40 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -7754,13 +7754,14 @@ ice_get_fv(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups,\n \n /**\n * ice_tun_type_match_word - determine if tun type needs a match mask\n- * @tun_type: tunnel type\n+ * @rinfo: other information regarding the rule e.g. priority and action info\n * @off: offset of packet flag\n * @mask: mask to be used for the tunnel\n */\n-static bool ice_tun_type_match_word(enum ice_sw_tunnel_type tun_type, u16 *off, u16 *mask)\n+static bool\n+ice_tun_type_match_word(struct ice_adv_rule_info *rinfo, u16 *off, u16 *mask)\n {\n-\tswitch (tun_type) {\n+\tswitch (rinfo->tun_type) {\n \tcase ICE_SW_TUN_VXLAN_GPE:\n \tcase ICE_SW_TUN_GENEVE:\n \tcase ICE_SW_TUN_VXLAN:\n@@ -7778,9 +7779,14 @@ static bool ice_tun_type_match_word(enum ice_sw_tunnel_type tun_type, u16 *off,\n \t\treturn true;\n \n \tcase ICE_SW_TUN_AND_NON_TUN:\n-\t\t*mask = ICE_DIR_FLAG_MASK;\n-\t\t*off = ICE_TUN_FLAG_MDID_OFF(0);\n-\t\treturn true;\n+\t\tif (rinfo->add_dir_lkup) {\n+\t\t\t*mask = ICE_DIR_FLAG_MASK;\n+\t\t\t*off = ICE_TUN_FLAG_MDID_OFF(0);\n+\t\t\treturn true;\n+\t\t}\n+\t\t*mask = 0;\n+\t\t*off = 0;\n+\t\treturn false;\n \n \tcase ICE_SW_TUN_GENEVE_VLAN:\n \tcase ICE_SW_TUN_VXLAN_VLAN:\n@@ -7811,7 +7817,7 @@ ice_add_special_words(struct ice_adv_rule_info *rinfo,\n \t * tunnel bit in the packet metadata flags. If this is a tun_and_non_tun\n \t * packet, then add recipe index to match the direction bit in the flag.\n \t */\n-\tif (ice_tun_type_match_word(rinfo->tun_type, &off, &mask)) {\n+\tif (ice_tun_type_match_word(rinfo, &off, &mask)) {\n \t\tif (lkup_exts->n_val_words < ICE_MAX_CHAIN_WORDS) {\n \t\t\tu8 word = lkup_exts->n_val_words++;\n \ndiff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h\nindex 7a12619459..7421e02466 100644\n--- a/drivers/net/ice/base/ice_switch.h\n+++ b/drivers/net/ice/base/ice_switch.h\n@@ -311,6 +311,7 @@ struct ice_adv_rule_info {\n \tstruct ice_sw_act_ctrl sw_act;\n \tu32 priority;\n \tu8 rx; /* true means LOOKUP_RX otherwise LOOKUP_TX */\n+\tu8 add_dir_lkup;\n \tu16 fltr_rule_id;\n \tu16 lg_id;\n \tstruct ice_adv_rule_flags_info flags_info;\n", "prefixes": [ "v2", "09/20" ] }{ "id": 127003, "url": "