Skip to content

Commit 54c28fa

Browse files
Michael Chankuba-moo
authored andcommitted
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: 79632e9 ("bnxt_en: Expand bnxt_tpa_info struct to support 57500 chips.") Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Colin Winegarden <colin.winegarden@broadcom.com> Reviewed-by: Rukhsana Ansari <rukhsana.ansari@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Link: https://patch.msgid.link/20260504083611.1383776-3-pavan.chebbi@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 07f4443 commit 54c28fa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • drivers/net/ethernet/broadcom/bnxt

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3825,7 +3825,10 @@ static int bnxt_alloc_tpa_info(struct bnxt *bp)
38253825
if (bp->flags & BNXT_FLAG_CHIP_P5_PLUS) {
38263826
if (!bp->max_tpa_v2)
38273827
return 0;
3828-
bp->max_tpa = max_t(u16, bp->max_tpa_v2, MAX_TPA_P5);
3828+
bp->max_tpa = min_t(u16, bp->max_tpa_v2, MAX_TPA_P5);
3829+
/* Older P5 FW sets max_tpa_v2 low by mistake except NPAR */
3830+
if (bp->max_tpa <= 32 && BNXT_CHIP_P5(bp) && !BNXT_NPAR(bp))
3831+
bp->max_tpa = MAX_TPA_P5;
38293832
}
38303833

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

0 commit comments

Comments
 (0)