Commit 54c28fab authored by Michael Chan's avatar Michael Chan Committed by Jakub Kicinski
Browse files

bnxt_en: Set bp->max_tpa according to what the FW supports



Fix the logic to set bp->max_tpa no higher than what the FW supports.
On P5 chips, some older FW sets max_tpa very low so we override it to
prevent performance regressions with the older FW.

Fixes: 79632e9b ("bnxt_en: Expand bnxt_tpa_info struct to support 57500 chips.")
Reviewed-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: default avatarColin Winegarden <colin.winegarden@broadcom.com>
Reviewed-by: default avatarRukhsana Ansari <rukhsana.ansari@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://patch.msgid.link/20260504083611.1383776-3-pavan.chebbi@broadcom.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 07f44433
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3825,7 +3825,10 @@ static int bnxt_alloc_tpa_info(struct bnxt *bp)
	if (bp->flags & BNXT_FLAG_CHIP_P5_PLUS) {
		if (!bp->max_tpa_v2)
			return 0;
		bp->max_tpa = max_t(u16, bp->max_tpa_v2, MAX_TPA_P5);
		bp->max_tpa = min_t(u16, bp->max_tpa_v2, MAX_TPA_P5);
		/* Older P5 FW sets max_tpa_v2 low by mistake except NPAR */
		if (bp->max_tpa <= 32 && BNXT_CHIP_P5(bp) && !BNXT_NPAR(bp))
			bp->max_tpa = MAX_TPA_P5;
	}

	for (i = 0; i < bp->rx_nr_rings; i++) {