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

Jakub Kicinski <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.infradead.lists.linux-arm-kernel,org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.osuosl.intel-wired-lan
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.