Re: [PATCH net v4] bnxt_en: Bound SW TPA IDs to prevent crashes
From: Joe Damato
Date: Tue Sep 01 2026 - 12:30:12 EST
On Tue, Sep 01, 2026 at 02:10:04PM +0200, Paolo Abeni wrote:
> On 9/1/26 1:57 PM, Joe Damato wrote:
> > On Tue, Sep 01, 2026 at 10:16:54AM +0200, Paolo Abeni wrote:
> >> On 8/28/26 9:08 PM, Joe Damato wrote:
> >>> - Moved bp->max_tpa_roundup_size init out of the early return path and
> >>> documented that TPA is unsupported there, as suggested by Michael.
> >>
> >> Clashiko quite convincingly elaborates that the above is not enough:
> >>
> >> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260828190900.1767611-1-joe%40dama.to
> >>
> >> Could you please have a look?
> [...]
> > 3.) "The new assignment sits after the max_tpa_v2 == 0 early return, so on a P5+
> > device whose firmware reports max_aggs_supported == 0, does
> > bp->max_tpa_roundup_size stay 0 while BNXT_FLAG_TPA is set? ..."
> >
> > Michael commented in the v3 that this is a false positive, hence why I changed
> > the code from what it was in the v3 to this.
>
> This is the comment I referred to.
>
> AFAICS the problem is that the driver sets
>
> bp->dev->hw_features |= NETIF_F_LRO;
>
> regardless of the supported capabilities, and that seams to disagree
> with Michael.
OK, after re-reading this here's what I see: NETIF_F_LRO gets added with no
capability check and bnxt_fix_features() won't strip it afterwards. I think
the fix there is to add a BNXT_SUPPORTS_TPA() test, as a Fixes for
f0aa6a37a3db ("eth: bnxt: always recalculate features after XDP clearing, fix
null-deref").
I can send a separate patch for that, but it is unrelated to this patch which
fixes a crash on boot for Thor2 devices.
Maybe you want me to spin a v5 that rewords the comment Michael asked me to
add which is currently technically incorrect, but will be correct after the
separate bug mentioned above is fixed?
In other words respin this to make a v5 that changes the comment to:
/* TPA is not supported at all, so there is nothing to
* allocate.
*/
And then when a fixes for the above commit is proposed, the comment can be
re-expanded?
Can you let me know what I am missing here?