Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/73365/?format=api
https://patches.dpdk.org/api/patches/73365/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200707051406.13817-4-jia.guo@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": "<20200707051406.13817-4-jia.guo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200707051406.13817-4-jia.guo@intel.com", "date": "2020-07-07T05:14:06", "name": "[v5,3/3] net/iavf: enable some new hash flow", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1992b100a3f7347decdaccd03c7f748237aa0b99", "submitter": { "id": 507, "url": "https://patches.dpdk.org/api/people/507/?format=api", "name": "Guo, Jia", "email": "jia.guo@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/20200707051406.13817-4-jia.guo@intel.com/mbox/", "series": [ { "id": 10833, "url": "https://patches.dpdk.org/api/series/10833/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10833", "date": "2020-07-07T05:14:03", "name": "enable new hash flow for VF", "version": 5, "mbox": "https://patches.dpdk.org/series/10833/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/73365/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/73365/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 60842A00BE;\n\tTue, 7 Jul 2020 07:15:26 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D8B591DA2B;\n\tTue, 7 Jul 2020 07:15:02 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 9FB431D99B\n for <dev@dpdk.org>; Tue, 7 Jul 2020 07:15:00 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jul 2020 22:15:00 -0700", "from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128])\n by fmsmga002.fm.intel.com with ESMTP; 06 Jul 2020 22:14:58 -0700" ], "IronPort-SDR": [ "\n sG7uC/QRYyKrbhfS7ZZaXHPQ/JRwO97W69f+t76FHzA2DzUY3Zf5MYuzZ/4s7O5o8rmlFQO8wB\n j0d1PCpQ/DnA==", "\n TNmSXB+PNdceOy8deZy4R4jimv9S9GxpHf3EF8/u/Aakztf3Z2BxSaQK4HxON0KvV8g4TT/OM9\n G7WUBsY54ADQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9674\"; a=\"135005671\"", "E=Sophos;i=\"5.75,321,1589266800\"; d=\"scan'208\";a=\"135005671\"", "E=Sophos;i=\"5.75,321,1589266800\"; d=\"scan'208\";a=\"315402644\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Jeff Guo <jia.guo@intel.com>", "To": "qi.z.zhang@intel.com,\n\tjingjing.wu@intel.com,\n\tbeilei.xing@intel.com", "Cc": "dev@dpdk.org, junfeng.guo@intel.com, qiming.yang@intel.com,\n simei.su@intel.com, jia.guo@intel.com", "Date": "Tue, 7 Jul 2020 13:14:06 +0800", "Message-Id": "<20200707051406.13817-4-jia.guo@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200707051406.13817-1-jia.guo@intel.com>", "References": "<20200621140235.20488-1-jia.guo@intel.com>\n <20200707051406.13817-1-jia.guo@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [dpdk-dev v5 3/3] net/iavf: enable some new hash flow", "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": "Some new hash flow will be supported to expend the flow hash\ncapability, the input set are the session id for NAT-T ESP protocol,\nthe l3 src/dst and the teid for GTPU_IP protocol.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\nv5->v4:\nno change\n---\n drivers/net/iavf/iavf_hash.c | 76 ++++++++++++++++++++++++++++++++++--\n 1 file changed, 72 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c\nindex b3b36cbc7..1394519e7 100644\n--- a/drivers/net/iavf/iavf_hash.c\n+++ b/drivers/net/iavf/iavf_hash.c\n@@ -33,9 +33,10 @@ enum iavf_pattern_hint_type {\n \tIAVF_PHINT_IPV6_UDP\t\t\t= 0x00000020,\n \tIAVF_PHINT_IPV6_TCP\t\t\t= 0x00000040,\n \tIAVF_PHINT_IPV6_SCTP\t\t\t= 0x00000080,\n-\tIAVF_PHINT_IPV4_GTPU_EH\t\t\t= 0x00000100,\n-\tIAVF_PHINT_IPV4_GTPU_EH_DWNLINK\t\t= 0x00000200,\n-\tIAVF_PHINT_IPV4_GTPU_EH_UPLINK\t\t= 0x00000400,\n+\tIAVF_PHINT_IPV4_GTPU_IP\t\t\t= 0x00000100,\n+\tIAVF_PHINT_IPV4_GTPU_EH\t\t\t= 0x00000200,\n+\tIAVF_PHINT_IPV4_GTPU_EH_DWNLINK\t\t= 0x00000400,\n+\tIAVF_PHINT_IPV4_GTPU_EH_UPLINK\t\t= 0x00000800,\n };\n \n #define IAVF_GTPU_EH_DWNLINK\t0\n@@ -92,6 +93,8 @@ static struct iavf_pattern_match_type phint_eth_ipv4_tcp = {\n \tIAVF_PHINT_IPV4_TCP};\n static struct iavf_pattern_match_type phint_eth_ipv4_sctp = {\n \tIAVF_PHINT_IPV4_SCTP};\n+static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_ipv4 = {\n+\tIAVF_PHINT_IPV4};\n static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4 = {\n \tIAVF_PHINT_IPV4};\n static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4_udp = {\n@@ -100,6 +103,8 @@ static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4_tcp = {\n \tIAVF_PHINT_IPV4_TCP};\n static struct iavf_pattern_match_type phint_eth_ipv4_esp = {\n \tIAVF_PHINT_IPV4};\n+static struct iavf_pattern_match_type phint_eth_ipv4_udp_esp = {\n+\tIAVF_PHINT_IPV4_UDP};\n static struct iavf_pattern_match_type phint_eth_ipv4_ah = {\n \tIAVF_PHINT_IPV4};\n static struct iavf_pattern_match_type phint_eth_ipv4_l2tpv3 = {\n@@ -124,6 +129,8 @@ static struct iavf_pattern_match_type phint_eth_ipv6_sctp = {\n \tIAVF_PHINT_IPV6_SCTP};\n static struct iavf_pattern_match_type phint_eth_ipv6_esp = {\n \tIAVF_PHINT_IPV6};\n+static struct iavf_pattern_match_type phint_eth_ipv6_udp_esp = {\n+\tIAVF_PHINT_IPV6_UDP};\n static struct iavf_pattern_match_type phint_eth_ipv6_ah = {\n \tIAVF_PHINT_IPV6};\n static struct iavf_pattern_match_type phint_eth_ipv6_l2tpv3 = {\n@@ -150,6 +157,8 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {\n \t{iavf_pattern_eth_ipv4_udp, IAVF_INSET_NONE, &phint_eth_ipv4_udp},\n \t{iavf_pattern_eth_ipv4_tcp, IAVF_INSET_NONE, &phint_eth_ipv4_tcp},\n \t{iavf_pattern_eth_ipv4_sctp, IAVF_INSET_NONE, &phint_eth_ipv4_sctp},\n+\t{iavf_pattern_eth_ipv4_gtpu_ipv4, IAVF_INSET_NONE,\n+\t\t\t\t\t&phint_eth_ipv4_gtpu_ipv4},\n \t{iavf_pattern_eth_ipv4_gtpu_eh_ipv4, IAVF_INSET_NONE,\n \t\t\t\t\t&phint_eth_ipv4_gtpu_eh_ipv4},\n \t{iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp, IAVF_INSET_NONE,\n@@ -157,6 +166,8 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {\n \t{iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp, IAVF_INSET_NONE,\n \t\t\t\t\t&phint_eth_ipv4_gtpu_eh_ipv4_tcp},\n \t{iavf_pattern_eth_ipv4_esp, IAVF_INSET_NONE, &phint_eth_ipv4_esp},\n+\t{iavf_pattern_eth_ipv4_udp_esp, IAVF_INSET_NONE,\n+\t\t\t\t\t&phint_eth_ipv4_udp_esp},\n \t{iavf_pattern_eth_ipv4_ah, IAVF_INSET_NONE, &phint_eth_ipv4_ah},\n \t{iavf_pattern_eth_ipv4_l2tpv3, IAVF_INSET_NONE,\n \t\t\t\t\t&phint_eth_ipv4_l2tpv3},\n@@ -173,6 +184,8 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {\n \t{iavf_pattern_eth_ipv6_tcp, IAVF_INSET_NONE, &phint_eth_ipv6_tcp},\n \t{iavf_pattern_eth_ipv6_sctp, IAVF_INSET_NONE, &phint_eth_ipv6_sctp},\n \t{iavf_pattern_eth_ipv6_esp, IAVF_INSET_NONE, &phint_eth_ipv6_esp},\n+\t{iavf_pattern_eth_ipv6_udp_esp, IAVF_INSET_NONE,\n+\t\t\t\t\t&phint_eth_ipv6_udp_esp},\n \t{iavf_pattern_eth_ipv6_ah, IAVF_INSET_NONE, &phint_eth_ipv6_ah},\n \t{iavf_pattern_eth_ipv6_l2tpv3, IAVF_INSET_NONE,\n \t\t\t\t\t&phint_eth_ipv6_l2tpv3},\n@@ -348,10 +361,18 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {\n \tFIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \\\n \tFIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), {BUFF_NOUSED } }\n \n+#define proto_hint_gtpu_ip_teid { \\\n+\tVIRTCHNL_PROTO_HDR_GTPU_IP, \\\n+\tFIELD_SELECTOR(VIRTCHNL_PROTO_HDR_GTPU_IP_TEID), {BUFF_NOUSED } }\n+\n #define proto_hint_gtpu_eh_only { \\\n \tVIRTCHNL_PROTO_HDR_GTPU_EH, \\\n \tFIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n \n+#define proto_hint_gtpu_ip_only { \\\n+\tVIRTCHNL_PROTO_HDR_GTPU_IP, \\\n+\tFIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n+\n #define proto_hint_gtpu_up_only { \\\n \tVIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, \\\n \tFIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }\n@@ -620,6 +641,26 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_esp = {\n \tproto_hint_udp_only, proto_hint_esp }\n };\n \n+/* GTPU IP */\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_ip = {\n+\tTUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only,\n+\tproto_hint_ipv4_src }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_ip = {\n+\tTUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only,\n+\tproto_hint_ipv4_dst }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_ip = {\n+\tTUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only,\n+\tproto_hint_ipv4 }\n+};\n+\n+struct virtchnl_proto_hdrs hdrs_hint_teid_gtpu_ip = {\n+\tTUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_teid}\n+};\n+\n /* GTPU EH */\n \n struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_eh = {\n@@ -1498,6 +1539,28 @@ struct iavf_hash_match_type iavf_hash_map_list[] = {\n \n struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = {\n \t/* GTPU */\n+\t/* GTPU IP */\n+\t/* GTPU IPV4*/\n+\t{ETH_RSS_L3_SRC_ONLY,\n+\t\t&hdrs_hint_ipv4_src_gtpu_ip,\n+\t\tIAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},\n+\t{ETH_RSS_L3_DST_ONLY,\n+\t\t&hdrs_hint_ipv4_dst_gtpu_ip,\n+\t\tIAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},\n+\t{ETH_RSS_IPV4 |\n+\t\tETH_RSS_L3_SRC_ONLY,\n+\t\t&hdrs_hint_ipv4_src_gtpu_ip,\n+\t\tIAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},\n+\t{ETH_RSS_IPV4 |\n+\t\tETH_RSS_L3_DST_ONLY,\n+\t\t&hdrs_hint_ipv4_dst_gtpu_ip,\n+\t\tIAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},\n+\t{ETH_RSS_IPV4,\n+\t\t&hdrs_hint_ipv4_gtpu_ip,\n+\t\tIAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},\n+\t{ETH_RSS_GTPU,\n+\t\t&hdrs_hint_teid_gtpu_ip,\n+\t\tIAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},\n \t/* GTPU EH */\n \t/* Inner IPV4 */\n \t{ETH_RSS_L3_SRC_ONLY,\n@@ -2052,8 +2115,12 @@ iavf_hash_parse_pattern(struct iavf_pattern_match_item *pattern_match_item,\n \t\t}\n \n \t\tswitch (item->type) {\n+\t\tcase RTE_FLOW_ITEM_TYPE_GTPU:\n+\t\t\t*phint |= IAVF_PHINT_IPV4_GTPU_IP;\n+\t\t\tbreak;\n \t\tcase RTE_FLOW_ITEM_TYPE_GTP_PSC:\n \t\t\tpsc = item->spec;\n+\t\t\t*phint &= ~IAVF_PHINT_IPV4_GTPU_IP;\n \t\t\tif (!psc)\n \t\t\t\t*phint |= IAVF_PHINT_IPV4_GTPU_EH;\n \t\t\telse if (psc->pdu_type == IAVF_GTPU_EH_UPLINK)\n@@ -2131,7 +2198,8 @@ iavf_hash_parse_action(const struct rte_flow_action actions[],\n \t\t\t */\n \t\t\trss_type = rte_eth_rss_hf_refine(rss_type);\n \n-\t\t\tif ((pattern_hint & IAVF_PHINT_IPV4_GTPU_EH) ||\n+\t\t\tif ((pattern_hint & IAVF_PHINT_IPV4_GTPU_IP) ||\n+\t\t\t (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH) ||\n \t\t\t (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH_UPLINK) ||\n \t\t\t (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH_DWNLINK)) {\n \t\t\t\thash_map_list = iavf_gtpu_hash_map_list;\n", "prefixes": [ "v5", "3/3" ] }{ "id": 73365, "url": "