Re: [PATCH net v3] bnxt_en: Bound SW TPA IDs to prevent crashes
From: Joe Damato
Date: Thu Aug 27 2026 - 19:41:14 EST
On Thu, Aug 27, 2026 at 04:07:16PM -0700, Michael Chan wrote:
> On Thu, Aug 27, 2026 at 11:57 AM Joe Damato <joe@xxxxxxx> wrote:
>
> > @@ -3831,6 +3834,7 @@ static int bnxt_alloc_tpa_info(struct bnxt *bp)
> > int i, rc;
> >
> > bp->max_tpa = MAX_TPA;
> > + bp->max_tpa_roundup_size = MAX_TPA;
>
> This is strictly not needed. If we return early below, it means the
> chip does not support TPA at all. We skip allocating the TPA array
> for every ring, so it really makes no difference.
>
> BNXT_SUPPORTS_TPA() will be false if we return early. LRO and HW_GRO
> will not be supported. So I would say it's a false positive from
> Sashiko. Thanks.
Sorry, I should have been more explicit in my last message: is it worth a
respin to remove this? Unless I am misunderstanding something, it's harmless
and while not necessary, might be more clear for a human reader?
LMK what you think.