From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 566281B107 for ; Wed, 21 Nov 2018 17:50:01 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5575C04959E; Wed, 21 Nov 2018 16:50:00 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id B70D55C21E; Wed, 21 Nov 2018 16:49:59 +0000 (UTC) From: Kevin Traynor To: Qi Zhang Cc: Beilei Xing , dpdk stable Date: Wed, 21 Nov 2018 16:47:34 +0000 Message-Id: <20181121164828.32249-20-ktraynor@redhat.com> In-Reply-To: <20181121164828.32249-1-ktraynor@redhat.com> References: <20181121164828.32249-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 21 Nov 2018 16:50:00 +0000 (UTC) Subject: [dpdk-stable] patch 'net/i40e/base: gracefully clean the resources' has been queued to stable release 18.08.1 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: Wed, 21 Nov 2018 16:50:01 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/27/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. Kevin Traynor --- >>From 6e69e70467764112b03d2c0fad8c3a2997fbf8d2 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 612be8839..0ca270eac 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -127,4 +127,5 @@ 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); } @@ -434,5 +435,5 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) ret_code = i40e_config_asq_regs(hw); if (ret_code != I40E_SUCCESS) - goto init_adminq_free_rings; + goto init_config_regs; /* success! */ @@ -442,4 +443,8 @@ 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: -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 16:44:31.477720594 +0000 +++ 0020-net-i40e-base-gracefully-clean-the-resources.patch 2018-11-21 16:44:30.000000000 +0000 @@ -1,13 +1,13 @@ -From 49ea51605be46b48b12c2267b7c2a12d5ed1ed07 Mon Sep 17 00:00:00 2001 +From 6e69e70467764112b03d2c0fad8c3a2997fbf8d2 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,23 +15,23 @@ 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 612be8839..0ca270eac 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c -@@ -98,4 +98,5 @@ enum i40e_status_code i40e_alloc_adminq_arq_ring(struct i40e_hw *hw) +@@ -127,4 +127,5 @@ 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); } -@@ -405,5 +406,5 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) +@@ -434,5 +435,5 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) ret_code = i40e_config_asq_regs(hw); if (ret_code != I40E_SUCCESS) - goto init_adminq_free_rings; + goto init_config_regs; /* success! */ -@@ -413,4 +414,8 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) +@@ -442,4 +443,8 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) init_adminq_free_rings: i40e_free_adminq_asq(hw); + return ret_code;