Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DATE_IN_PAST_06_12, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C23FEC43331 for ; Tue, 12 Nov 2019 06:31:43 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 8735E214E0 for ; Tue, 12 Nov 2019 06:31:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8735E214E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B23EF2BAE; Tue, 12 Nov 2019 07:31:35 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8930E2BAC for ; Tue, 12 Nov 2019 07:31:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 22:31:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,295,1569308400"; d="scan'208";a="287452425" Received: from intel.sh.intel.com ([10.239.255.146]) by orsmga001.jf.intel.com with ESMTP; 11 Nov 2019 22:31:32 -0800 From: Wang ShougangX To: dev@dpdk.org Cc: qiming.yang@intel.com, beilei.xing@intel.com, Wang ShougangX Date: Tue, 12 Nov 2019 00:10:14 +0000 Message-Id: <20191112001015.30467-4-shougangx.wang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191112001015.30467-1-shougangx.wang@intel.com> References: <20191107022217.41046-1-shougangx.wang@intel.com> <20191112001015.30467-1-shougangx.wang@intel.com> Subject: [dpdk-dev] [PATCH v3 3/4] net/ice: fix FDIR counter resource release X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" All the counter resources should be cleaned up when teardown. Fixes: 0f880c3df192 ("net/ice: add flow director counter resource init/release") Signed-off-by: Wang ShougangX --- drivers/net/ice/ice_fdir_filter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index f728b9062..361969f71 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -252,6 +252,9 @@ ice_fdir_counter_release(struct ice_pf *pf) for (i = 0; i < container->index_free; i++) rte_free(container->pools[i]); + TAILQ_INIT(&container->pool_list); + container->index_free = 0; + return 0; } -- 2.17.1