From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id EC0BF201 for ; Mon, 15 Oct 2018 13:51:56 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id y140-v6so22873706wmd.0 for ; Mon, 15 Oct 2018 04:51:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T5qv0ODEe3JMG8JjRdjwXhVxH/2LNcSH7y2F92vHnT8=; b=ay8tyiE8Vn3bYJGM5tKvB861YpzMd5usZsFsSozXW/lMf+Oc62Y1J+I+m9yqGiL2de yZZnA9Z0k3jNdN5fyQduVbg3fbmHv418ggxjBhwlxvfRl9naIcOjS46lAiLOB6CwJyvx /+gMrpQR1h3Qjts8JoRBKHx0h/Tm9AZStYNbIONU33OcnFy/1NZ0u8yNul4yaxUE5HUH qdbpPyWJtq/feOmbzJAwkYzb0b07ejG/KMw54ppVs/QRXs1h9a4hoHCK75LcSgTTeqcJ 1CUJY+Lfb//4O1uWF1M+glVKyPNu/DxZ6mjFpqP3VEtQmKAilnT37kkq1430XF9ToJCB idnQ== X-Gm-Message-State: ABuFfoi6xIeSv6S2qu+EcbhOdbo+6bXnxjffHNoemVQn5Koghb8XS3Lm pz9axRBtkN4gLCXnVWU6Af8Q7ehp X-Google-Smtp-Source: ACcGV62zzoEz57xaFH7iIksdHpojzzlrS4D+lGadUAvMBVRXd3gK2GawVonnlHLvrmzXP0HBs0bjHw== X-Received: by 2002:a1c:a1c6:: with SMTP id k189-v6mr13619930wme.0.1539604316542; Mon, 15 Oct 2018 04:51:56 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id 64-v6sm8749838wrr.64.2018.10.15.04.51.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 04:51:55 -0700 (PDT) From: Luca Boccassi To: Qi Zhang Cc: Beilei Xing , dpdk stable Date: Mon, 15 Oct 2018 12:51:24 +0100 Message-Id: <20181015115144.27626-4-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181015115144.27626-1-bluca@debian.org> References: <20181003162121.16364-1-bluca@debian.org> <20181015115144.27626-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e/base: gracefully clean the resources' has been queued to LTS release 16.11.9 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: Mon, 15 Oct 2018 11:51:57 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/17/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. Luca Boccassi --- >>From 675e3710dfcda4e3ff7b4edb67a5e5ef57c7dbdc 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 e231582c54..4d3f938e18 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.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-15 12:48:34.723774107 +0100 +++ 0004-net-i40e-base-gracefully-clean-the-resources.patch 2018-10-15 12:48:34.501096017 +0100 @@ -1,13 +1,13 @@ -From 49ea51605be46b48b12c2267b7c2a12d5ed1ed07 Mon Sep 17 00:00:00 2001 +From 675e3710dfcda4e3ff7b4edb67a5e5ef57c7dbdc 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 5736e0cb31..bb4c5c61e7 100644 +index e231582c54..4d3f938e18 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);