Skip to content

Commit c1bbd99

Browse files
pavanchebbikuba-moo
authored andcommitted
bnxt_en: Fix deleting of Ntuple filters
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: 8336a97 ("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>
1 parent e123d93 commit c1bbd99

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • drivers/net/ethernet/broadcom/bnxt

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6240,6 +6240,9 @@ int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp,
62406240
int rc;
62416241

62426242
set_bit(BNXT_FLTR_FW_DELETED, &fltr->base.state);
6243+
if (!test_bit(BNXT_STATE_OPEN, &bp->state))
6244+
return 0;
6245+
62436246
rc = hwrm_req_init(bp, req, HWRM_CFA_NTUPLE_FILTER_FREE);
62446247
if (rc)
62456248
return rc;

0 commit comments

Comments
 (0)