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 89F4EA04F0; Tue, 17 Dec 2019 05:19:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A65E1BF7D; Tue, 17 Dec 2019 05:18:42 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 717A2378E for ; Tue, 17 Dec 2019 05:18:35 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 2BE4B1BE6D3; Mon, 16 Dec 2019 20:18:33 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 2BE4B1BE6D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1576556315; bh=T4fxaGXTZaQ0AoHnodk4QMdkjOwZZ33gBjcc2SmQ+ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Se4FIR3Jq4kKx5h2zWjwcvCNlDAirqUbSGGJ0cb3N9Ri0yKIfluHCZKmfPEIqO8zi 0JwfjrCiUd/kfs8wtNnx7b/aU3TXMm8edRYf3SturPU3t4iO01qToEXRJnebr3RvW6 GzpTZbV0+41p4FHLW0WO0bWUGsZQaDZjZ0B2kRsk= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Tue, 17 Dec 2019 09:47:55 +0530 Message-Id: <20191217041755.29232-7-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20191217041755.29232-1-somnath.kotur@broadcom.com> References: <20191217041755.29232-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 6/6] net/bnxt: fix to free l2 filters while clearing vnic flows/filters 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" Now that L2 filters can be re-used for an n-tuple filter(s), delete L2 filter as well so the reference count of an L2 filter (if reused) can be decremented appropriately. Fixes: 0ba82dee ("net/bnxt: fix to check for L2 filters that doesn't have any references") Signed-off-by: Somnath Kotur Reviewed-by: Santoshkumar Karanappa Rastapur --- drivers/net/bnxt/bnxt_hwrm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 1b19fba..50272dc 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2496,8 +2496,7 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic) rc = bnxt_hwrm_clear_em_filter(bp, filter); else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER) rc = bnxt_hwrm_clear_ntuple_filter(bp, filter); - else - rc = bnxt_hwrm_clear_l2_filter(bp, filter); + rc = bnxt_hwrm_clear_l2_filter(bp, filter); STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next); bnxt_free_filter(bp, filter); } @@ -2519,8 +2518,7 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic) rc = bnxt_hwrm_clear_em_filter(bp, filter); else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER) rc = bnxt_hwrm_clear_ntuple_filter(bp, filter); - else - rc = bnxt_hwrm_clear_l2_filter(bp, filter); + rc = bnxt_hwrm_clear_l2_filter(bp, filter); STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next); rte_free(flow); -- 1.8.3.1