]> git.droids-corp.org - dpdk.git/commit
net/bnxt: fix freeing VNIC filters
authorSomnath Kotur <somnath.kotur@broadcom.com>
Wed, 27 Apr 2022 14:58:20 +0000 (20:28 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 10 May 2022 05:14:20 +0000 (07:14 +0200)
commit2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24
tree6de104e4a97ebbaf97c4e7a31d222a2dedc88646
parent5591bb92ced3a841398eec4444f593a22b1ca6ea
net/bnxt: fix freeing VNIC filters

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: f0f6b5e6cf94 ("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>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_filter.c