[16/17] net/bnxt: fix freeing of VNIC filters
Checks
Commit Message
From: Somnath Kotur <somnath.kotur@broadcom.com>
In bnxt_free_all_filters(), all the filters attached to a vnic are removed.
But each of these filters hold a backreference ptr to the vnic and they
need to be reset to NULL now. Otherwise, during a normal testpmd quit, as
part of dev_close_op(), first bnxt_free_all_filters() is invoked in
dev_stop, followed by bnxt_free_filter_mem() from bnxt_uninit_resources(),
which finds a filter with a vnic back reference ptr and now
bnxt_hwrm_clean_up_l2_filter() also tries to remove the filter from the
vnic's filter list which was already done as part of
bnxt_free_all_filters().
Fixes: f0f6b5e6cf9("net/bnxt: fix reusing L2 filter")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt_filter.c | 2 ++
1 file changed, 2 insertions(+)
@@ -99,6 +99,8 @@ void bnxt_free_all_filters(struct bnxt *bp)
bnxt_filter_info, next);
STAILQ_INSERT_TAIL(&bp->free_filter_list,
filter, next);
+ if (filter->vnic)
+ filter->vnic = NULL;
filter = temp_filter;
}
STAILQ_INIT(&vnic->filter);