Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/77410/?format=api
http://patches.dpdk.org/api/patches/77410/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-24-qi.z.zhang@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": "<20200911131954.15999-24-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200911131954.15999-24-qi.z.zhang@intel.com", "date": "2020-09-11T13:19:37", "name": "[v2,23/40] net/ice/base: move a function", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3afb29c4b68e298076b035eb5dcb2338e87164f2", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-24-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 12148, "url": "http://patches.dpdk.org/api/series/12148/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12148", "date": "2020-09-11T13:19:15", "name": "ice base code update", "version": 2, "mbox": "http://patches.dpdk.org/series/12148/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/77410/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/77410/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 6E230A04B7;\n\tFri, 11 Sep 2020 15:20:38 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1AE0F1C1E7;\n\tFri, 11 Sep 2020 15:16:44 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 6FD9B1C1BC\n for <dev@dpdk.org>; Fri, 11 Sep 2020 15:16:35 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 06:16:35 -0700", "from dpdk51.sh.intel.com ([10.67.111.82])\n by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2020 06:16:33 -0700" ], "IronPort-SDR": [ "\n RVmQm976EDMT7Lr1RFAp7EvTySOcvcBgSIpkg0Y1SZqW3inz4n6dCMbPnrPujtemMHYAUBUWXC\n DM7rAadaxx0Q==", "\n aIPra0Megbu6ZNl6Ad8dNqWefl1BLJskgTsY3JoKOtMv0/IHxnPk0B5qMDsSkW8HuCfZIl/mkL\n 1DDJeWhwTaiw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9740\"; a=\"146482303\"", "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"146482303\"", "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"342296663\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "ferruh.yigit@intel.com", "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Tony Nguyen <anthony.l.nguyen@intel.com>", "Date": "Fri, 11 Sep 2020 21:19:37 +0800", "Message-Id": "<20200911131954.15999-24-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20200911131954.15999-1-qi.z.zhang@intel.com>", "References": "<20200907112826.48493-1-qi.z.zhang@intel.com>\n <20200911131954.15999-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 23/40] net/ice/base: move a 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 only caller of this function is within the file so mark it as static\nand move it up in the file to avoid a forward declaration.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_acl.h | 1 -\n drivers/net/ice/base/ice_acl_ctrl.c | 93 ++++++++++++++++++-------------------\n 2 files changed, 45 insertions(+), 49 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_acl.h b/drivers/net/ice/base/ice_acl.h\nindex 500db0c35..cd75e1c17 100644\n--- a/drivers/net/ice/base/ice_acl.h\n+++ b/drivers/net/ice/base/ice_acl.h\n@@ -132,7 +132,6 @@ enum ice_status ice_acl_destroy_tbl(struct ice_hw *hw);\n enum ice_status\n ice_acl_create_scen(struct ice_hw *hw, u16 match_width, u16 num_entries,\n \t\t u16 *scen_id);\n-enum ice_status ice_acl_destroy_scen(struct ice_hw *hw, u16 scen_id);\n enum ice_status\n ice_aq_alloc_acl_tbl(struct ice_hw *hw, struct ice_acl_alloc_tbl *tbl,\n \t\t struct ice_sq_cd *cd);\ndiff --git a/drivers/net/ice/base/ice_acl_ctrl.c b/drivers/net/ice/base/ice_acl_ctrl.c\nindex 0ecf38496..02a1dd34f 100644\n--- a/drivers/net/ice/base/ice_acl_ctrl.c\n+++ b/drivers/net/ice/base/ice_acl_ctrl.c\n@@ -842,6 +842,51 @@ ice_acl_create_scen(struct ice_hw *hw, u16 match_width, u16 num_entries,\n }\n \n /**\n+ * ice_acl_destroy_scen - Destroy an ACL scenario\n+ * @hw: pointer to the HW struct\n+ * @scen_id: ID of the remove scenario\n+ */\n+static enum ice_status ice_acl_destroy_scen(struct ice_hw *hw, u16 scen_id)\n+{\n+\tstruct ice_acl_scen *scen, *tmp_scen;\n+\tstruct ice_flow_prof *p, *tmp;\n+\tenum ice_status status;\n+\n+\tif (!hw->acl_tbl)\n+\t\treturn ICE_ERR_DOES_NOT_EXIST;\n+\n+\t/* Remove profiles that use \"scen_id\" scenario */\n+\tLIST_FOR_EACH_ENTRY_SAFE(p, tmp, &hw->fl_profs[ICE_BLK_ACL],\n+\t\t\t\t ice_flow_prof, l_entry)\n+\t\tif (p->cfg.scen && p->cfg.scen->id == scen_id) {\n+\t\t\tstatus = ice_flow_rem_prof(hw, ICE_BLK_ACL, p->id);\n+\t\t\tif (status) {\n+\t\t\t\tice_debug(hw, ICE_DBG_ACL, \"ice_flow_rem_prof failed. status: %d\\n\",\n+\t\t\t\t\t status);\n+\t\t\t\treturn status;\n+\t\t\t}\n+\t\t}\n+\n+\t/* Call the AQ command to destroy the targeted scenario */\n+\tstatus = ice_aq_dealloc_acl_scen(hw, scen_id, NULL);\n+\tif (status) {\n+\t\tice_debug(hw, ICE_DBG_ACL, \"AQ de-allocation of scenario failed. status: %d\\n\",\n+\t\t\t status);\n+\t\treturn status;\n+\t}\n+\n+\t/* Remove scenario from hw->acl_tbl->scens */\n+\tLIST_FOR_EACH_ENTRY_SAFE(scen, tmp_scen, &hw->acl_tbl->scens,\n+\t\t\t\t ice_acl_scen, list_entry)\n+\t\tif (scen->id == scen_id) {\n+\t\t\tLIST_DEL(&scen->list_entry);\n+\t\t\tice_free(hw, scen);\n+\t\t}\n+\n+\treturn ICE_SUCCESS;\n+}\n+\n+/**\n * ice_acl_destroy_tbl - Destroy a previously created LEM table for ACL\n * @hw: pointer to the HW struct\n */\n@@ -1118,51 +1163,3 @@ ice_acl_rem_entry(struct ice_hw *hw, struct ice_acl_scen *scen, u16 entry_idx)\n \n \treturn status;\n }\n-\n-/**\n- * ice_acl_destroy_scen - Destroy an ACL scenario\n- * @hw: pointer to the HW struct\n- * @scen_id: ID of the remove scenario\n- */\n-enum ice_status ice_acl_destroy_scen(struct ice_hw *hw, u16 scen_id)\n-{\n-\tstruct ice_acl_scen *scen, *tmp_scen;\n-\tstruct ice_flow_prof *p, *tmp;\n-\tenum ice_status status;\n-\n-\tif (!hw->acl_tbl)\n-\t\treturn ICE_ERR_DOES_NOT_EXIST;\n-\n-\t/* Remove profiles that use \"scen_id\" scenario */\n-\tLIST_FOR_EACH_ENTRY_SAFE(p, tmp, &hw->fl_profs[ICE_BLK_ACL],\n-\t\t\t\t ice_flow_prof, l_entry)\n-\t\tif (p->cfg.scen && p->cfg.scen->id == scen_id) {\n-\t\t\tstatus = ice_flow_rem_prof(hw, ICE_BLK_ACL, p->id);\n-\t\t\tif (status) {\n-\t\t\t\tice_debug(hw, ICE_DBG_ACL,\n-\t\t\t\t\t \"ice_flow_rem_prof failed. status: %d\\n\",\n-\t\t\t\t\t status);\n-\t\t\t\tgoto exit;\n-\t\t\t}\n-\t\t}\n-\n-\t/* Call the AQ command to destroy the targeted scenario */\n-\tstatus = ice_aq_dealloc_acl_scen(hw, scen_id, NULL);\n-\n-\tif (status) {\n-\t\tice_debug(hw, ICE_DBG_ACL,\n-\t\t\t \"AQ de-allocation of scenario failed. status: %d\\n\",\n-\t\t\t status);\n-\t\tgoto exit;\n-\t}\n-\n-\t/* Remove scenario from hw->acl_tbl->scens */\n-\tLIST_FOR_EACH_ENTRY_SAFE(scen, tmp_scen, &hw->acl_tbl->scens,\n-\t\t\t\t ice_acl_scen, list_entry)\n-\t\tif (scen->id == scen_id) {\n-\t\t\tLIST_DEL(&scen->list_entry);\n-\t\t\tice_free(hw, scen);\n-\t\t}\n-exit:\n-\treturn status;\n-}\n", "prefixes": [ "v2", "23/40" ] }{ "id": 77410, "url": "