Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/77682/?format=api
http://patches.dpdk.org/api/patches/77682/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200915062609.3786061-2-junfeng.guo@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": "<20200915062609.3786061-2-junfeng.guo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200915062609.3786061-2-junfeng.guo@intel.com", "date": "2020-09-15T06:26:08", "name": "[v3,1/2] net/iavf: replace function name with macro", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "01f6b1c1b58877896cb35edb78b68d0d48f02942", "submitter": { "id": 1785, "url": "http://patches.dpdk.org/api/people/1785/?format=api", "name": "Junfeng Guo", "email": "junfeng.guo@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/20200915062609.3786061-2-junfeng.guo@intel.com/mbox/", "series": [ { "id": 12217, "url": "http://patches.dpdk.org/api/series/12217/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12217", "date": "2020-09-15T06:26:07", "name": "add AVF RSS support for IPv6 prefix", "version": 3, "mbox": "http://patches.dpdk.org/series/12217/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/77682/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/77682/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 F08EDA04C7;\n\tTue, 15 Sep 2020 08:29:31 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 532131C129;\n\tTue, 15 Sep 2020 08:28:26 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 6AE5B1C12A\n for <dev@dpdk.org>; Tue, 15 Sep 2020 08:28:24 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Sep 2020 23:28:24 -0700", "from dpdk-junfengguo-v3.sh.intel.com ([10.67.119.146])\n by orsmga007.jf.intel.com with ESMTP; 14 Sep 2020 23:28:22 -0700" ], "IronPort-SDR": [ "\n ucvjOEdFF2dLV0FmGljePyR8Yi7dgSfzlpy0TdaUFtOYFAE0tZDYlu8WRYfR48BAvWV/IPY8eh\n 5ob7zRmZ4utQ==", "\n 7qIOwg11kXwmjHhL3tp977AA3hHqLtjJUIsFO/YKBF6yn2qTyjIydWTGQdMEn7tC0f6YifHqtr\n h2+tOyyNat5g==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9744\"; a=\"160141053\"", "E=Sophos;i=\"5.76,428,1592895600\"; d=\"scan'208\";a=\"160141053\"", "E=Sophos;i=\"5.76,428,1592895600\"; d=\"scan'208\";a=\"345700490\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Junfeng Guo <junfeng.guo@intel.com>", "To": "qi.z.zhang@intel.com,\n\tjingjing.wu@intel.com,\n\tbeilei.xing@intel.com", "Cc": "dev@dpdk.org,\n\tjunfeng.guo@intel.com", "Date": "Tue, 15 Sep 2020 14:26:08 +0800", "Message-Id": "<20200915062609.3786061-2-junfeng.guo@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200915062609.3786061-1-junfeng.guo@intel.com>", "References": "<20200804123920.485253-1-junfeng.guo@intel.com>\n <20200915062609.3786061-1-junfeng.guo@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 1/2] net/iavf: replace function name with macro", "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": "Replace some function name with macro to shrink coding charactors.\n\tVIRTCHNL_DEL_PROTO_HDR_FIELD, VIRTCHNL_ADD_PROTO_HDR_FIELD\n\t--> REFINE_PROTO_FLD.\n\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n drivers/net/iavf/iavf_hash.c | 42 ++++++++++++++----------------------\n 1 file changed, 16 insertions(+), 26 deletions(-)", "diff": "diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c\nindex 3152218dc..d8a4dc8bf 100644\n--- a/drivers/net/iavf/iavf_hash.c\n+++ b/drivers/net/iavf/iavf_hash.c\n@@ -539,6 +539,9 @@ iavf_hash_parse_pattern(struct iavf_pattern_match_item *pattern_match_item,\n \treturn 0;\n }\n \n+#define REFINE_PROTO_FLD(op, fld) \\\n+\tVIRTCHNL_##op##_PROTO_HDR_FIELD(hdr, VIRTCHNL_PROTO_HDR_##fld)\n+\n /* refine proto hdrs base on l2, l3, l4 rss type */\n static void\n iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n@@ -554,11 +557,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\t\tif (!(rss_type & ETH_RSS_ETH))\n \t\t\t\thdr->field_selector = 0;\n \t\t\telse if (rss_type & ETH_RSS_L2_SRC_ONLY)\n-\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\tVIRTCHNL_PROTO_HDR_ETH_DST);\n+\t\t\t\tREFINE_PROTO_FLD(DEL, ETH_DST);\n \t\t\telse if (rss_type & ETH_RSS_L2_DST_ONLY)\n-\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\tVIRTCHNL_PROTO_HDR_ETH_SRC);\n+\t\t\t\tREFINE_PROTO_FLD(DEL, ETH_SRC);\n \t\t\tbreak;\n \t\tcase VIRTCHNL_PROTO_HDR_IPV4:\n \t\t\tif (rss_type &\n@@ -567,11 +568,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\t\t ETH_RSS_NONFRAG_IPV4_TCP |\n \t\t\t ETH_RSS_NONFRAG_IPV4_SCTP)) {\n \t\t\t\tif (rss_type & ETH_RSS_L3_SRC_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t\tVIRTCHNL_PROTO_HDR_IPV4_DST);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, IPV4_DST);\n \t\t\t\telse if (rss_type & ETH_RSS_L3_DST_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t\tVIRTCHNL_PROTO_HDR_IPV4_SRC);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, IPV4_SRC);\n \t\t\t\telse if (rss_type &\n \t\t\t\t\t (ETH_RSS_L4_SRC_ONLY |\n \t\t\t\t\t ETH_RSS_L4_DST_ONLY))\n@@ -587,11 +586,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\t\t ETH_RSS_NONFRAG_IPV6_TCP |\n \t\t\t ETH_RSS_NONFRAG_IPV6_SCTP)) {\n \t\t\t\tif (rss_type & ETH_RSS_L3_SRC_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t\tVIRTCHNL_PROTO_HDR_IPV6_DST);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, IPV6_DST);\n \t\t\t\telse if (rss_type & ETH_RSS_L3_DST_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t\tVIRTCHNL_PROTO_HDR_IPV6_SRC);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, IPV6_SRC);\n \t\t\t\telse if (rss_type &\n \t\t\t\t\t (ETH_RSS_L4_SRC_ONLY |\n \t\t\t\t\t ETH_RSS_L4_DST_ONLY))\n@@ -605,11 +602,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\t\t (ETH_RSS_NONFRAG_IPV4_UDP |\n \t\t\t ETH_RSS_NONFRAG_IPV6_UDP)) {\n \t\t\t\tif (rss_type & ETH_RSS_L4_SRC_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t VIRTCHNL_PROTO_HDR_UDP_DST_PORT);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, UDP_DST_PORT);\n \t\t\t\telse if (rss_type & ETH_RSS_L4_DST_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t VIRTCHNL_PROTO_HDR_UDP_SRC_PORT);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, UDP_SRC_PORT);\n \t\t\t\telse if (rss_type &\n \t\t\t\t\t (ETH_RSS_L3_SRC_ONLY |\n \t\t\t\t\t ETH_RSS_L3_DST_ONLY))\n@@ -623,11 +618,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\t\t (ETH_RSS_NONFRAG_IPV4_TCP |\n \t\t\t ETH_RSS_NONFRAG_IPV6_TCP)) {\n \t\t\t\tif (rss_type & ETH_RSS_L4_SRC_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t VIRTCHNL_PROTO_HDR_TCP_DST_PORT);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, TCP_DST_PORT);\n \t\t\t\telse if (rss_type & ETH_RSS_L4_DST_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t VIRTCHNL_PROTO_HDR_TCP_SRC_PORT);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, TCP_SRC_PORT);\n \t\t\t\telse if (rss_type &\n \t\t\t\t\t (ETH_RSS_L3_SRC_ONLY |\n \t\t\t\t\t ETH_RSS_L3_DST_ONLY))\n@@ -641,11 +634,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\t\t (ETH_RSS_NONFRAG_IPV4_SCTP |\n \t\t\t ETH_RSS_NONFRAG_IPV6_SCTP)) {\n \t\t\t\tif (rss_type & ETH_RSS_L4_SRC_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t VIRTCHNL_PROTO_HDR_SCTP_DST_PORT);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, SCTP_DST_PORT);\n \t\t\t\telse if (rss_type & ETH_RSS_L4_DST_ONLY)\n-\t\t\t\t\tVIRTCHNL_DEL_PROTO_HDR_FIELD(hdr,\n-\t\t\t\t\t VIRTCHNL_PROTO_HDR_TCP_SRC_PORT);\n+\t\t\t\t\tREFINE_PROTO_FLD(DEL, SCTP_SRC_PORT);\n \t\t\t\telse if (rss_type &\n \t\t\t\t\t (ETH_RSS_L3_SRC_ONLY |\n \t\t\t\t\t ETH_RSS_L3_DST_ONLY))\n@@ -699,8 +690,7 @@ iavf_refine_proto_hdrs_gtpu(struct virtchnl_proto_hdrs *proto_hdrs,\n \t\thdr = &proto_hdrs->proto_hdr[i];\n \t\tswitch (hdr->type) {\n \t\tcase VIRTCHNL_PROTO_HDR_GTPU_IP:\n-\t\t\tVIRTCHNL_ADD_PROTO_HDR_FIELD(hdr,\n-\t\t\t\tVIRTCHNL_PROTO_HDR_GTPU_IP_TEID);\n+\t\t\tREFINE_PROTO_FLD(ADD, GTPU_IP_TEID);\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tbreak;\n", "prefixes": [ "v3", "1/2" ] }{ "id": 77682, "url": "