From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D4B2FA0351 for ; Thu, 6 Aug 2020 11:59:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD0AB1C127; Thu, 6 Aug 2020 11:59:18 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 9969B1C11B for ; Thu, 6 Aug 2020 11:59:17 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id a14so43429904wra.5 for ; Thu, 06 Aug 2020 02:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pbe6GBw0lw1z1ffj83Ff7wveXcTLW1zSPbKR2ygAmNE=; b=LCy33/pqPdoW7IWzK4ETND1khgEJVMrSr7Qetex1KiCBDvrbKJwObc/UqoEggufDda y7+sDqdp6tMgnsuBWhAbGc3J448iqKbleGNyZDGkjTMLel4F8+LqRjw7Bqkel/g2/tqf ExznQYiTBfrpERPMlFOW3cYciWqSoLqvr0HM7Yb649LwSCF+j0jvVgjHV5mMwvxaxDx9 0nLRwA1KuG129mqSQ4ythuCjoprf2CZ/u9YXSs1XIpfnt8QU2GRWoEkbPr5V0Ct08bzK r+NP82biz1IL+lLtdJrIi0L6+UEloVfmPbmkka/VfEFnU8wauwcqlN8QcmfUKisKbZ6n Gvzg== 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=Pbe6GBw0lw1z1ffj83Ff7wveXcTLW1zSPbKR2ygAmNE=; b=ZfHZ1Z9peUQ3zU1ZxZ6YJaauM3wbLJoKH/7DhxjgxoHgrhHKkDbLaE51PGXuhP1XIT m0uqd6OZiJRLS7Wl3iUCX2L1tUAwThHbbqiPvrMfErMc+WeX612KHeS5E0EzbMNTf4MN zNEgfMGGKRlkGZqEZD5FLZTdvZDocvsxIh8fwD7Z4Q1juSJ8varePe8NnlmIjTAnc89m F/ry66PWEr9hdo88TLtvafFbYBibWCAIW5cwVbJZTDKsPXAoqH1OPKYnk+IYGqA3E/0/ SGuhfzJgv4LJsWVH+ZxXYCYirxIZTxG3fd+6taTOExo2nQ0Ke8GIpf619sPuQRZpSEBT susg== X-Gm-Message-State: AOAM532KwUpEaQFKofQEk4FvMtSLHPdv6g7+DmV5yB/mpprRoKflMWg4 2qHM+2sDwSrD6oaiJuVahNc6pdCHqKuzQA== X-Google-Smtp-Source: ABdhPJzJroR89+aby9G/nETUPWMGFqAnFARoX4bSN55mkQ9wm6he3G51Gf3s8htsPXBgKfBe0QqjBQ== X-Received: by 2002:a5d:5151:: with SMTP id u17mr6730734wrt.154.1596707957328; Thu, 06 Aug 2020 02:59:17 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g18sm6225431wru.27.2020.08.06.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 02:59:16 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Qi Zhang , dpdk stable Date: Thu, 6 Aug 2020 10:53:59 +0100 Message-Id: <20200806095411.774624-31-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806095411.774624-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> <20200806095411.774624-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice: fix memory leak when releasing VSI' has been queued to stable release 19.11.4 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/08/20. 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. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 3e0872f373407e8fed3faf060296850e5ae79f5a Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 28 Jul 2020 21:11:12 +0800 Subject: [PATCH] net/ice: fix memory leak when releasing VSI [ upstream commit 5d4a54fd1646585adfedb1675e78a513cf194b25 ] At the end of the vsi release, we should free the 'rss_lut' and 'rss_key' for the vsi. Fixes: 50370662b727 ("net/ice: support device and queue ops") Signed-off-by: Yunjian Wang Acked-by: Qi Zhang --- drivers/net/ice/ice_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 5166dafd0..34ca161e5 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2288,9 +2288,10 @@ ice_release_vsi(struct ice_vsi *vsi) struct ice_hw *hw; struct ice_vsi_ctx vsi_ctx; enum ice_status ret; + int error = 0; if (!vsi) - return 0; + return error; hw = ICE_VSI_TO_HW(vsi); @@ -2303,12 +2304,13 @@ ice_release_vsi(struct ice_vsi *vsi) ret = ice_free_vsi(hw, vsi->idx, &vsi_ctx, false, NULL); if (ret != ICE_SUCCESS) { PMD_INIT_LOG(ERR, "Failed to free vsi by aq, %u", vsi->vsi_id); - rte_free(vsi); - return -1; + error = -1; } + rte_free(vsi->rss_lut); + rte_free(vsi->rss_key); rte_free(vsi); - return 0; + return error; } void -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-06 10:53:16.996273736 +0100 +++ 0031-net-ice-fix-memory-leak-when-releasing-VSI.patch 2020-08-06 10:53:15.820597797 +0100 @@ -1,13 +1,14 @@ -From 5d4a54fd1646585adfedb1675e78a513cf194b25 Mon Sep 17 00:00:00 2001 +From 3e0872f373407e8fed3faf060296850e5ae79f5a Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 28 Jul 2020 21:11:12 +0800 Subject: [PATCH] net/ice: fix memory leak when releasing VSI +[ upstream commit 5d4a54fd1646585adfedb1675e78a513cf194b25 ] + At the end of the vsi release, we should free the 'rss_lut' and 'rss_key' for the vsi. Fixes: 50370662b727 ("net/ice: support device and queue ops") -Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Qi Zhang @@ -16,10 +17,10 @@ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c -index c4c0e638f..a29c9addc 100644 +index 5166dafd0..34ca161e5 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c -@@ -2280,9 +2280,10 @@ ice_release_vsi(struct ice_vsi *vsi) +@@ -2288,9 +2288,10 @@ ice_release_vsi(struct ice_vsi *vsi) struct ice_hw *hw; struct ice_vsi_ctx vsi_ctx; enum ice_status ret; @@ -31,7 +32,7 @@ hw = ICE_VSI_TO_HW(vsi); -@@ -2295,12 +2296,13 @@ ice_release_vsi(struct ice_vsi *vsi) +@@ -2303,12 +2304,13 @@ ice_release_vsi(struct ice_vsi *vsi) ret = ice_free_vsi(hw, vsi->idx, &vsi_ctx, false, NULL); if (ret != ICE_SUCCESS) { PMD_INIT_LOG(ERR, "Failed to free vsi by aq, %u", vsi->vsi_id);