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 97487A0526 for ; Fri, 10 Jul 2020 04:07:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 805AC1D6D3; Fri, 10 Jul 2020 04:07:00 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7D6CB1D6D3 for ; Fri, 10 Jul 2020 04:06:57 +0200 (CEST) IronPort-SDR: WtjPApwrlcLg7sl9wS35kelzbPbozwDcPmwRbiVw07t4wULF2h0v5pMfoW3T0eHwI2zoMiLwJO JMkFgCPnJI+w== X-IronPort-AV: E=McAfee;i="6000,8403,9677"; a="166227956" X-IronPort-AV: E=Sophos;i="5.75,334,1589266800"; d="scan'208";a="166227956" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 19:06:56 -0700 IronPort-SDR: o/1aRM+DiBpW+t5mV/qo25V21Lh6qwXqNYhfeQcZhL8WnOW1/YJff1kvhDnqa1Y1SzXFzgCWS5 MR4HXYjvWNDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,334,1589266800"; d="scan'208";a="280493898" Received: from dpdk-junfengguo-v3.sh.intel.com ([10.67.119.146]) by orsmga003.jf.intel.com with ESMTP; 09 Jul 2020 19:06:55 -0700 From: Junfeng Guo To: qabuild@intel.com Cc: Qi Zhang , stable@dpdk.org, Vignesh Sridhar , Paul M Stillwell Jr , Qiming Yang Date: Fri, 10 Jul 2020 10:04:49 +0800 Message-Id: <20200710020450.3384574-7-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200710020450.3384574-1-junfeng.guo@intel.com> References: <20200710020450.3384574-1-junfeng.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [DPDK 7/8] net/ice/base: clear and free XLT entries on reset 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" From: Qi Zhang This fix has been added to address memory leak issues resulting from triggering a sudden driver reset which does not allow us to follow our normal removal flows for SW XLT entries for advanced features. - Adding call to destroy flow profile locks when clearing SW XLT tables. - Extraction sequence entries were not correctly cleared previously which could cause ownership conflicts for repeated reset-replay calls. Fixes: 969890d505b1 ("net/ice/base: enable clearing of HW tables") Cc: stable@dpdk.org Signed-off-by: Vignesh Sridhar Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_flex_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c index 016dc2b39..284569464 100644 --- a/drivers/net/ice/base/ice_flex_pipe.c +++ b/drivers/net/ice/base/ice_flex_pipe.c @@ -3666,6 +3666,8 @@ static void ice_free_flow_profs(struct ice_hw *hw, u8 blk_idx) LIST_DEL(&p->l_entry); if (p->acts) ice_free(hw, p->acts); + + ice_destroy_lock(&p->entries_lock); ice_free(hw, p); } ice_release_lock(&hw->fl_profs_locks[blk_idx]); @@ -3794,7 +3796,7 @@ void ice_clear_hw_tbls(struct ice_hw *hw) prof_redir->count * sizeof(*prof_redir->t), ICE_NONDMA_MEM); - ice_memset(es->t, 0, es->count * sizeof(*es->t), + ice_memset(es->t, 0, es->count * sizeof(*es->t) * es->fvw, ICE_NONDMA_MEM); ice_memset(es->ref_count, 0, es->count * sizeof(*es->ref_count), ICE_NONDMA_MEM); -- 2.25.1