[PATCH 3/7] net/bnxt: refactor VNIC context cleanup
Ajit Khaparde
ajit.khaparde at broadcom.com
Thu Feb 8 18:13:26 CET 2024
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 <ajit.khaparde at broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
---
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4218 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/dev/attachments/20240208/63afda02/attachment.bin>
More information about the dev
mailing list