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 B9576A0518 for ; Fri, 24 Jul 2020 14:11:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA13E1C239; Fri, 24 Jul 2020 14:11:06 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id EFD9A1C20A for ; Fri, 24 Jul 2020 14:11:04 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id r4so5135445wrx.9 for ; Fri, 24 Jul 2020 05:11:04 -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=N9Ecas0igmAewuVFK8O5ASsTgCb0PdnQTQkIy+0xStA=; b=FOOLVB+4MaNvkMZz/mwG5XCvzvlzx2am25R21noH5HR7EGWDx1mGl0EMl73kAH4VgG O+JV+pwE9kDbEBWISRzO04D/a8FzsBimp86FVLNi1ofGIc+lWhfCLz5RgQZhZ/m/rpqu Pm0xoyrn7R+uRx+hHLAWeqhYNR9Mh33sEocvuH7tZSVYEnn5e980rfDxHENycQcyGhfs 6kX7PCefjg9AVAEYWs2XW39haOEb6PFHt5XW098VM19Xo+3cpIj6+e2WK8PshI8zhAfi VVDhG9XFznTjztUAXkAsyrc9PedUPEhgKmOOAiFMHyeCCZY9wdBtEcxlZVeU2YaDFey/ k3ng== 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=N9Ecas0igmAewuVFK8O5ASsTgCb0PdnQTQkIy+0xStA=; b=IjjYZF9cNq0RQEZ+9MtNItNOVhqS7GDST0YFhVksvKmyRnCRg2RaiXqtkse5ntWt0d WqpTmbWcAb7KBJkl58tcrWTajURtCvhl60/Wb6fNYPhHFOt9CsmRQRPWIkHPEwnsbYrn ucRX2tn/CMf2UrH8LCbmHqDFiZ8pnnQcfSt/q0F8WZFQLy6c2CsKV8uB21N/vKFbC3QQ 9YxtiMTa/HhSmvAp0BbIXkKtNHKJlM1a+FNnl4IB1R9OjjiOBNVcslCu3FKWAs0CEJ1A jXp6h3F1qF/cFX9I55kRXb9txxnp42cmnBa7KveO5Tuq1PK8V4L9E1L9+6C2jT3/Q3UQ rYQw== X-Gm-Message-State: AOAM53057JdlUi3S8zVpNxVVJZ+DCuMe/68ABn3yD4oTQ73wdQvAh0Qh 5bFpR+gNEaDJ7eqk/jfPZt8= X-Google-Smtp-Source: ABdhPJzto8q9npYm1rc3BgHG8lv93PcmWSCjksbfbtGxo9GXXU+1Uk8oBioQw+otmOsjv1ud1JJGaQ== X-Received: by 2002:adf:9463:: with SMTP id 90mr8188427wrq.223.1595592664664; Fri, 24 Jul 2020 05:11:04 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id l1sm1258619wrb.12.2020.07.24.05.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:11:03 -0700 (PDT) From: luca.boccassi@gmail.com To: Junfeng Guo Cc: Qi Zhang , dpdk stable Date: Fri, 24 Jul 2020 13:00:01 +0100 Message-Id: <20200724120030.1863487-163-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice/base: fix memory leak on GTPU RSS' 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 07/26/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 e9d4b11347fe6f5e875bc3b0e0c7974721dbc597 Mon Sep 17 00:00:00 2001 From: Junfeng Guo Date: Mon, 20 Jul 2020 15:09:55 +0800 Subject: [PATCH] net/ice/base: fix memory leak on GTPU RSS [ upstream commit c7b545fc91137803a2c42bff512e9a6b7254c936 ] Add memory space free logic for adding and removing GTP-U before return success status, to avoid memory leak issue. Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist") Signed-off-by: Junfeng Guo Acked-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 83432bd20..277bb4a27 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -2126,8 +2126,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, /* don't do RSS for GTPU outer */ if (segs_cnt == ICE_RSS_OUTER_HEADERS && - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) - return ICE_SUCCESS; + segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) { + status = ICE_SUCCESS; + goto exit; + } /* Search for a flow profile that has matching headers, hash fields * and has the input VSI associated to it. If found, no further @@ -2286,8 +2288,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, goto out; if (segs_cnt == ICE_RSS_OUTER_HEADERS && - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) - return ICE_SUCCESS; + segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) { + status = ICE_SUCCESS; + goto out; + } prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, vsi_handle, -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:54.853066544 +0100 +++ 0163-net-ice-base-fix-memory-leak-on-GTPU-RSS.patch 2020-07-24 12:53:48.543011229 +0100 @@ -1,13 +1,14 @@ -From c7b545fc91137803a2c42bff512e9a6b7254c936 Mon Sep 17 00:00:00 2001 +From e9d4b11347fe6f5e875bc3b0e0c7974721dbc597 Mon Sep 17 00:00:00 2001 From: Junfeng Guo Date: Mon, 20 Jul 2020 15:09:55 +0800 Subject: [PATCH] net/ice/base: fix memory leak on GTPU RSS +[ upstream commit c7b545fc91137803a2c42bff512e9a6b7254c936 ] + Add memory space free logic for adding and removing GTP-U before return success status, to avoid memory leak issue. Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist") -Cc: stable@dpdk.org Signed-off-by: Junfeng Guo Acked-by: Qi Zhang @@ -16,10 +17,10 @@ 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c -index 094f5370a..6035bdfcf 100644 +index 83432bd20..277bb4a27 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c -@@ -3586,8 +3586,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, +@@ -2126,8 +2126,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, /* don't do RSS for GTPU outer */ if (segs_cnt == ICE_RSS_OUTER_HEADERS && @@ -32,7 +33,7 @@ /* Search for a flow profile that has matching headers, hash fields * and has the input VSI associated to it. If found, no further -@@ -3746,8 +3748,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, +@@ -2286,8 +2288,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, goto out; if (segs_cnt == ICE_RSS_OUTER_HEADERS &&