From: Damodharam Ammepalli Cleanup vnic ref count when port is stopped. When vlan strip is set/unset the current active vnics are destroyed and recreated with VNIC id provided by firmware. The default vnic at index 0 still has ref_cnt=1 while rx_queues are reset to 0, which fails the check under bnxt_vnic_rss_action_free() Resetting the vnic->ref_cnt in bnxt_free_all_hwrm_resources() post FW handshake in clean-up path. Signed-off-by: Damodharam Ammepalli Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 397b4a0e05..1d523d6dec 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -3584,6 +3584,8 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp) rte_free(vnic->fw_grp_ids); vnic->fw_grp_ids = NULL; + if (vnic->ref_cnt && !vnic->rx_queue_cnt) + vnic->ref_cnt--; } /* Ring resources */ bnxt_free_all_hwrm_rings(bp); -- 2.39.2 (Apple Git-143)