Re: [Intel-wired-lan] [PATCH net v2 3/3] net: stmmac: skip queueMaxSDU check for AF_XDP

From: Jakub Kicinski

Date: Tue Aug 18 2026 - 14:19:56 EST


On Tue, 18 Aug 2026 10:03:16 -0700 Stanislav Fomichev wrote:
> > Was completing the reserved descriptor considered instead of removing the
> > check, i.e. keeping the length test and doing:
> >
> > if (priv->est && priv->est->enable &&
> > priv->est->max_sdu[queue] &&
> > xdp_desc.len > priv->est->max_sdu[queue]) {
> > priv->xstats.max_sdu_txq_drop[queue]++;
> > xsk_tx_completed(pool, 1);
> > continue;
> > }
> >
> > That would fix the ring accounting without dropping the enforcement.
>
> Don't think this suggestion would work. xsk_tx_completed(1) will complete
> the first queued entry, no the current rejected one (completions are in order).
>
> If it's not convincing, I can repost only patches 1 and 2. Or if it sounds
> reasonable, can try to explain that part in the description.

Hm, I see. No strong preference but I'd probably just add a comment
above the checks saying that we are leaking there semi-intentionally
because it's an application error to send packets HW/schedule can't
handle. We expect user to fix their app. IOW if we can't handle this
well I think it's better to wedge the SW and bump the drop counter
for visibility, than risk HW silently misbehaving.