summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Chebbi <pavan.chebbi@broadcom.com>2026-02-19 21:53:12 +0300
committerSasha Levin <sashal@kernel.org>2026-03-04 15:21:32 +0300
commitcf95db5e33bd4a3ca227b1ab67a0b4c1e1923e4f (patch)
tree762fe57b3da33c76ef54f5cacc6d8c4903debab6
parent348a5f8d06c7bdf954e13c17ad5f80b59a075604 (diff)
downloadlinux-cf95db5e33bd4a3ca227b1ab67a0b4c1e1923e4f.tar.xz
bnxt_en: Fix deleting of Ntuple filters
[ Upstream commit c1bbd9900d65ac65b9fce9f129e3369a04871570 ] Ntuple filters can be deleted when the interface is down. The current code blindly sends the filter delete command to FW. When the interface is down, all the VNICs are deleted in the FW. When the VNIC is freed in the FW, all the associated filters are also freed. We need not send the free command explicitly. Sending such command will generate FW error in the dmesg. In order to fix this, we can safely return from bnxt_hwrm_cfa_ntuple_filter_free() when BNXT_STATE_OPEN is not true which confirms the VNICs have been deleted. Fixes: 8336a974f37d ("bnxt_en: Save user configured filters in a lookup list") Suggested-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20260219185313.2682148-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index bc3e64cce52b..7b84ed5c300e 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -5991,6 +5991,9 @@ int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp,
int rc;
set_bit(BNXT_FLTR_FW_DELETED, &fltr->base.state);
+ if (!test_bit(BNXT_STATE_OPEN, &bp->state))
+ return 0;
+
rc = hwrm_req_init(bp, req, HWRM_CFA_NTUPLE_FILTER_FREE);
if (rc)
return rc;