Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45268/?format=api
http://patches.dpdk.org/api/patches/45268/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-10-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": "<20180925023442.134705-10-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180925023442.134705-10-qi.z.zhang@intel.com", "date": "2018-09-25T02:34:31", "name": "[09/20] net/i40e/base: properly clean resources", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1d4e82ac5acb889f64b9e3819804dfd46c4e1892", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@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/20180925023442.134705-10-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 1477, "url": "http://patches.dpdk.org/api/series/1477/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1477", "date": "2018-09-25T02:34:22", "name": "base code update", "version": 1, "mbox": "http://patches.dpdk.org/series/1477/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/45268/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/45268/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9AC8A1B1E9;\n\tTue, 25 Sep 2018 04:34:26 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id CD33F5F3C;\n\tTue, 25 Sep 2018 04:34:10 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Sep 2018 19:34:08 -0700", "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga005.jf.intel.com with ESMTP; 24 Sep 2018 19:33:54 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.54,300,1534834800\"; d=\"scan'208\";a=\"259958528\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "beilei.xing@intel.com", "Cc": "dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>, stable@dpdk.org", "Date": "Tue, 25 Sep 2018 10:34:31 +0800", "Message-Id": "<20180925023442.134705-10-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180925023442.134705-1-qi.z.zhang@intel.com>", "References": "<20180925023442.134705-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 09/20] net/i40e/base: properly clean resources", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Allocated resources were not freed in the event of a failure in\ni40e_init_lan_hmc function. This patch gracefully handles the fail\ncase after initializing the lan hmc.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/i40e/base/i40e_lan_hmc.c | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c\nindex 510c11826..0afee49b1 100644\n--- a/drivers/net/i40e/base/i40e_lan_hmc.c\n+++ b/drivers/net/i40e/base/i40e_lan_hmc.c\n@@ -114,7 +114,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,\n \t\tret_code = I40E_ERR_INVALID_HMC_OBJ_COUNT;\n \t\tDEBUGOUT3(\"i40e_init_lan_hmc: Tx context: asks for 0x%x but max allowed is 0x%x, returns error %d\\n\",\n \t\t\t txq_num, obj->max_cnt, ret_code);\n-\t\tgoto init_lan_hmc_out;\n+\t\tgoto free_hmc_out;\n \t}\n \n \t/* aggregate values into the full LAN object for later */\n@@ -137,7 +137,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,\n \t\tret_code = I40E_ERR_INVALID_HMC_OBJ_COUNT;\n \t\tDEBUGOUT3(\"i40e_init_lan_hmc: Rx context: asks for 0x%x but max allowed is 0x%x, returns error %d\\n\",\n \t\t\t rxq_num, obj->max_cnt, ret_code);\n-\t\tgoto init_lan_hmc_out;\n+\t\tgoto free_hmc_out;\n \t}\n \n \t/* aggregate values into the full LAN object for later */\n@@ -160,7 +160,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,\n \t\tret_code = I40E_ERR_INVALID_HMC_OBJ_COUNT;\n \t\tDEBUGOUT3(\"i40e_init_lan_hmc: FCoE context: asks for 0x%x but max allowed is 0x%x, returns error %d\\n\",\n \t\t\t fcoe_cntx_num, obj->max_cnt, ret_code);\n-\t\tgoto init_lan_hmc_out;\n+\t\tgoto free_hmc_out;\n \t}\n \n \t/* aggregate values into the full LAN object for later */\n@@ -183,7 +183,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,\n \t\tret_code = I40E_ERR_INVALID_HMC_OBJ_COUNT;\n \t\tDEBUGOUT3(\"i40e_init_lan_hmc: FCoE filter: asks for 0x%x but max allowed is 0x%x, returns error %d\\n\",\n \t\t\t fcoe_filt_num, obj->max_cnt, ret_code);\n-\t\tgoto init_lan_hmc_out;\n+\t\tgoto free_hmc_out;\n \t}\n \n \t/* aggregate values into the full LAN object for later */\n@@ -204,7 +204,7 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,\n \t\t\t\t\t (sizeof(struct i40e_hmc_sd_entry) *\n \t\t\t\t\t hw->hmc.sd_table.sd_cnt));\n \t\tif (ret_code)\n-\t\t\tgoto init_lan_hmc_out;\n+\t\t\tgoto free_hmc_out;\n \t\thw->hmc.sd_table.sd_entry =\n \t\t\t(struct i40e_hmc_sd_entry *)hw->hmc.sd_table.addr.va;\n \t}\n@@ -213,6 +213,11 @@ enum i40e_status_code i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,\n \n init_lan_hmc_out:\n \treturn ret_code;\n+free_hmc_out:\n+\tif (hw->hmc.hmc_obj_virt_mem.va)\n+\t\ti40e_free_virt_mem(hw, &hw->hmc.hmc_obj_virt_mem);\n+\n+\treturn ret_code;\n }\n \n /**\n", "prefixes": [ "09/20" ] }{ "id": 45268, "url": "