Currently the VNIC context cleanup is being called a little early leading to the VNIC RSS context being freed prior to the filter cleanup corresponding to the VNIC. But since these filters could still be referenced by the default VNIC the hardware fails to find the corresponding VNIC context in some rare cases. Modify the cleanup sequence for the VNICs to free the VNIC contexts after the filters and the actual VNIC is freed up in the firmware. Also make sure to clear the rx_mask with mask of 0 for default VNIC. Signed-off-by: Ajit Khaparde Reviewed-by: Kalesh AP Reviewed-by: Kishore Padmanabha --- drivers/net/bnxt/bnxt_hwrm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 17527a3c4d..397b4a0e05 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -3570,16 +3570,18 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp) if (vnic->fw_vnic_id == INVALID_HW_RING_ID) continue; + if (vnic->func_default && (bp->flags & BNXT_FLAG_DFLT_VNIC_SET)) + bnxt_hwrm_cfa_l2_clear_rx_mask(bp, vnic); bnxt_clear_hwrm_vnic_flows(bp, vnic); bnxt_clear_hwrm_vnic_filters(bp, vnic); - bnxt_hwrm_vnic_ctx_free(bp, vnic); - bnxt_hwrm_vnic_tpa_cfg(bp, vnic, false); bnxt_hwrm_vnic_free(bp, vnic); + bnxt_hwrm_vnic_ctx_free(bp, vnic); + rte_free(vnic->fw_grp_ids); vnic->fw_grp_ids = NULL; } -- 2.39.2 (Apple Git-143)