Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/76876/?format=api
http://patches.dpdk.org/api/patches/76876/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200908073939.4099976-2-zhirun.yan@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": "<20200908073939.4099976-2-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200908073939.4099976-2-zhirun.yan@intel.com", "date": "2020-09-08T07:39:38", "name": "[v1,1/2] net/ice: refactor FDIR set conf function", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "bc55b013c986a2075ea1e9afc49d549bf8840d61", "submitter": { "id": 1154, "url": "http://patches.dpdk.org/api/people/1154/?format=api", "name": "Yan, Zhirun", "email": "zhirun.yan@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/20200908073939.4099976-2-zhirun.yan@intel.com/mbox/", "series": [ { "id": 12012, "url": "http://patches.dpdk.org/api/series/12012/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12012", "date": "2020-09-08T07:39:37", "name": "refactor and clean FDIR", "version": 1, "mbox": "http://patches.dpdk.org/series/12012/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/76876/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/76876/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 471D1A04AA;\n\tTue, 8 Sep 2020 09:42:43 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ECBB21C0CA;\n\tTue, 8 Sep 2020 09:42:37 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id 08D01A3\n for <dev@dpdk.org>; Tue, 8 Sep 2020 09:42:34 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Sep 2020 00:42:33 -0700", "from dpdk-zhirun-dev.sh.intel.com ([10.67.118.201])\n by fmsmga006.fm.intel.com with ESMTP; 08 Sep 2020 00:42:29 -0700" ], "IronPort-SDR": [ "\n AYrs9XmCsYmMngqV4FZHZANZOLhi+3StAr6l4eTX/68cXq7IfWywamQhDih0KV/Ys698wdqw8y\n X1bf75lDRExg==", "\n 6ELVfMZ4joznowZV3CEp4QYg+nmLoLk8Bftn/g8A6OdrPHirykvyFeTBSkPSXbE4Y2Xwdts3LV\n PaIM+kW0NapA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9737\"; a=\"222298260\"", "E=Sophos;i=\"5.76,405,1592895600\"; d=\"scan'208\";a=\"222298260\"", "E=Sophos;i=\"5.76,405,1592895600\"; d=\"scan'208\";a=\"504284906\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Zhirun Yan <zhirun.yan@intel.com>", "To": "qi.z.zhang@intel.com,\n\tdev@dpdk.org", "Cc": "yahui.cao@intel.com, xiao.w.wang@intel.com, simei.su@intel.com,\n junfeng.guo@intel.com, Zhirun Yan <zhirun.yan@intel.com>", "Date": "Tue, 8 Sep 2020 15:39:38 +0800", "Message-Id": "<20200908073939.4099976-2-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200908073939.4099976-1-zhirun.yan@intel.com>", "References": "<20200908073939.4099976-1-zhirun.yan@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v1 1/2] net/ice: refactor FDIR set conf function", "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": "The original set conf function in FDIR was very long. Refactor to\nincrease readability to make it clearer and allow for more convenient\nfurther changes.\n\nNo functional change here.\n\nSigned-off-by: Zhirun Yan <zhirun.yan@intel.com>\n---\n drivers/net/ice/ice_fdir_filter.c | 54 ++++++++++++++++++-------------\n 1 file changed, 31 insertions(+), 23 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c\nindex 88c9bb03d..593dfd0e2 100644\n--- a/drivers/net/ice/ice_fdir_filter.c\n+++ b/drivers/net/ice/ice_fdir_filter.c\n@@ -964,30 +964,10 @@ ice_fdir_input_set_parse(uint64_t inset, enum ice_flow_field *field)\n \t}\n }\n \n-static int\n-ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,\n-\t\t\tuint64_t input_set, enum ice_fdir_tunnel_type ttype)\n+static void\n+ice_fdir_input_set_hdrs(enum ice_fltr_ptype flow, struct ice_flow_seg_info *seg,\n+\t\t\tenum ice_fdir_tunnel_type ttype)\n {\n-\tstruct ice_flow_seg_info *seg;\n-\tstruct ice_flow_seg_info *seg_tun = NULL;\n-\tenum ice_flow_field field[ICE_FLOW_FIELD_IDX_MAX];\n-\tbool is_tunnel;\n-\tint i, ret;\n-\n-\tif (!input_set)\n-\t\treturn -EINVAL;\n-\n-\tseg = (struct ice_flow_seg_info *)\n-\t\tice_malloc(hw, sizeof(*seg));\n-\tif (!seg) {\n-\t\tPMD_DRV_LOG(ERR, \"No memory can be allocated\");\n-\t\treturn -ENOMEM;\n-\t}\n-\n-\tfor (i = 0; i < ICE_FLOW_FIELD_IDX_MAX; i++)\n-\t\tfield[i] = ICE_FLOW_FIELD_IDX_MAX;\n-\tice_fdir_input_set_parse(input_set, field);\n-\n \tswitch (flow) {\n \tcase ICE_FLTR_PTYPE_NONF_IPV4_UDP:\n \t\tICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_UDP |\n@@ -1063,6 +1043,34 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,\n \t\tPMD_DRV_LOG(ERR, \"not supported filter type.\");\n \t\tbreak;\n \t}\n+}\n+\n+static int\n+ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,\n+\t\t\tuint64_t input_set, enum ice_fdir_tunnel_type ttype)\n+{\n+\tstruct ice_flow_seg_info *seg;\n+\tstruct ice_flow_seg_info *seg_tun = NULL;\n+\tenum ice_flow_field field[ICE_FLOW_FIELD_IDX_MAX];\n+\tbool is_tunnel;\n+\tint i, ret;\n+\n+\tif (!input_set)\n+\t\treturn -EINVAL;\n+\n+\tseg = (struct ice_flow_seg_info *)\n+\t\tice_malloc(hw, sizeof(*seg));\n+\tif (!seg) {\n+\t\tPMD_DRV_LOG(ERR, \"No memory can be allocated\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tfor (i = 0; i < ICE_FLOW_FIELD_IDX_MAX; i++)\n+\t\tfield[i] = ICE_FLOW_FIELD_IDX_MAX;\n+\n+\tice_fdir_input_set_parse(input_set, field);\n+\n+\tice_fdir_input_set_hdrs(flow, seg, ttype);\n \n \tfor (i = 0; field[i] != ICE_FLOW_FIELD_IDX_MAX; i++) {\n \t\tice_flow_set_fld(seg, field[i],\n", "prefixes": [ "v1", "1/2" ] }{ "id": 76876, "url": "