Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/77671/?format=api
http://patches.dpdk.org/api/patches/77671/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200915052702.3194061-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": "<20200915052702.3194061-2-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200915052702.3194061-2-zhirun.yan@intel.com", "date": "2020-09-15T05:27:01", "name": "[v3,1/2] net/ice: refactor FDIR set conf function", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "357114accc8c44d8c0765ccb831b5d63094910dd", "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/20200915052702.3194061-2-zhirun.yan@intel.com/mbox/", "series": [ { "id": 12215, "url": "http://patches.dpdk.org/api/series/12215/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12215", "date": "2020-09-15T05:27:00", "name": "refactor and clean FDIR", "version": 3, "mbox": "http://patches.dpdk.org/series/12215/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/77671/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/77671/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 5C39EA04C7;\n\tTue, 15 Sep 2020 07:30:55 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C7FD01C0C6;\n\tTue, 15 Sep 2020 07:30:52 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id 2004A160\n for <dev@dpdk.org>; Tue, 15 Sep 2020 07:30:47 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Sep 2020 22:30:47 -0700", "from dpdk-zhirun-dev.sh.intel.com ([10.67.118.201])\n by orsmga005.jf.intel.com with ESMTP; 14 Sep 2020 22:30:45 -0700" ], "IronPort-SDR": [ "\n vKloMkQ8GqcGDJt08GmqqZ5/cdqsasGHELX3BrmzM1lNP8jIUfW6EHMn/ANxvZf1bfrIrfBfxY\n ySEjXXCRIb9w==", "\n P2Dl1b5br5y8zRgdh7K3VEnhgs/mOa8X+V+swc0N8c24xP8Ak2p8WeOpsZ3bbvWSX2+NUX/+x8\n WoNwLezXN9Yw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9744\"; a=\"244034961\"", "E=Sophos;i=\"5.76,428,1592895600\"; d=\"scan'208\";a=\"244034961\"", "E=Sophos;i=\"5.76,428,1592895600\"; d=\"scan'208\";a=\"482623817\"" ], "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, 15 Sep 2020 13:27:01 +0800", "Message-Id": "<20200915052702.3194061-2-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200915052702.3194061-1-zhirun.yan@intel.com>", "References": "<20200908073939.4099976-1-zhirun.yan@intel.com>\n <20200915052702.3194061-1-zhirun.yan@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 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 | 53 +++++++++++++++++--------------\n 1 file changed, 30 insertions(+), 23 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c\nindex c4b7265ce..a65523781 100644\n--- a/drivers/net/ice/ice_fdir_filter.c\n+++ b/drivers/net/ice/ice_fdir_filter.c\n@@ -943,30 +943,9 @@ 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 {\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@@ -1038,6 +1017,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);\n \n \tfor (i = 0; field[i] != ICE_FLOW_FIELD_IDX_MAX; i++) {\n \t\tice_flow_set_fld(seg, field[i],\n", "prefixes": [ "v3", "1/2" ] }{ "id": 77671, "url": "