From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 5ABF31B505 for ; Fri, 30 Nov 2018 00:13:46 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:19:37 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW7f032075; Fri, 30 Nov 2018 01:13:42 +0200 From: Yongseok Koh To: Qi Zhang Cc: Beilei Xing , dpdk stable Date: Thu, 29 Nov 2018 15:10:35 -0800 Message-Id: <20181129231202.30436-41-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/i40e/base: gracefully clean the resources' has been queued to LTS release 17.11.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 23:13:46 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 33d65adf97a88cd64767cf8a69882e9337cf7a5b Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Tue, 25 Sep 2018 10:34:32 +0800 Subject: [PATCH] net/i40e/base: gracefully clean the resources [ upstream commit 49ea51605be46b48b12c2267b7c2a12d5ed1ed07 ] Allocated resources were not freed in the event of failure in i40e_init_asq function. This patch gracefully handles all failures. Signed-off-by: Qi Zhang Acked-by: Beilei Xing --- drivers/net/i40e/base/i40e_adminq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 8cc8c5eca..4cf641b4a 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -126,6 +126,7 @@ enum i40e_status_code i40e_alloc_adminq_arq_ring(struct i40e_hw *hw) **/ void i40e_free_adminq_asq(struct i40e_hw *hw) { + i40e_free_virt_mem(hw, &hw->aq.asq.cmd_buf); i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); } @@ -433,7 +434,7 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) /* initialize base registers */ ret_code = i40e_config_asq_regs(hw); if (ret_code != I40E_SUCCESS) - goto init_adminq_free_rings; + goto init_config_regs; /* success! */ hw->aq.asq.count = hw->aq.num_asq_entries; @@ -441,6 +442,10 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) init_adminq_free_rings: i40e_free_adminq_asq(hw); + return ret_code; + +init_config_regs: + i40e_free_asq_bufs(hw); init_adminq_exit: return ret_code; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:47.055079289 -0800 +++ 0041-net-i40e-base-gracefully-clean-the-resources.patch 2018-11-29 15:01:45.075968000 -0800 @@ -1,13 +1,13 @@ -From 49ea51605be46b48b12c2267b7c2a12d5ed1ed07 Mon Sep 17 00:00:00 2001 +From 33d65adf97a88cd64767cf8a69882e9337cf7a5b Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Tue, 25 Sep 2018 10:34:32 +0800 Subject: [PATCH] net/i40e/base: gracefully clean the resources +[ upstream commit 49ea51605be46b48b12c2267b7c2a12d5ed1ed07 ] + Allocated resources were not freed in the event of failure in i40e_init_asq function. This patch gracefully handles all failures. -Cc: stable@dpdk.org - Signed-off-by: Qi Zhang Acked-by: Beilei Xing --- @@ -15,10 +15,10 @@ 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c -index 5736e0cb3..bb4c5c61e 100644 +index 8cc8c5eca..4cf641b4a 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c -@@ -97,6 +97,7 @@ enum i40e_status_code i40e_alloc_adminq_arq_ring(struct i40e_hw *hw) +@@ -126,6 +126,7 @@ enum i40e_status_code i40e_alloc_adminq_arq_ring(struct i40e_hw *hw) **/ void i40e_free_adminq_asq(struct i40e_hw *hw) { @@ -26,7 +26,7 @@ i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); } -@@ -404,7 +405,7 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) +@@ -433,7 +434,7 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) /* initialize base registers */ ret_code = i40e_config_asq_regs(hw); if (ret_code != I40E_SUCCESS) @@ -35,7 +35,7 @@ /* success! */ hw->aq.asq.count = hw->aq.num_asq_entries; -@@ -412,6 +413,10 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) +@@ -441,6 +442,10 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) init_adminq_free_rings: i40e_free_adminq_asq(hw);