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

Loktionov, Aleksandr aleksandr.loktionov at intel.com
Tue Aug 18 03:38:00 PDT 2026



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf
> Of Stanislav Fomichev
> Sent: Thursday, August 13, 2026 9:08 PM
> To: netdev at vger.kernel.org
> Cc: davem at davemloft.net; edumazet at google.com; kuba at kernel.org;
> pabeni at redhat.com; Nguyen, Anthony L <anthony.l.nguyen at intel.com>;
> Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com>;
> andrew+netdev at lunn.ch; saeedm at nvidia.com; tariqt at nvidia.com;
> mbloch at nvidia.com; maxime.chevallier at bootlin.com;
> mcoquelin.stm32 at gmail.com; alexandre.torgue at foss.st.com; Lobakin,
> Aleksander <aleksander.lobakin at intel.com>; horms at kernel.org; Karlsson,
> Magnus <magnus.karlsson at intel.com>; Fijalkowski, Maciej
> <maciej.fijalkowski at intel.com>; sdf at fomichev.me; ast at kernel.org;
> daniel at iogearbox.net; hawk at kernel.org; john.fastabend at gmail.com;
> witu at nvidia.com; martin.lau at kernel.org; Song, Yoong Siang
> <yoong.siang.song at intel.com>; G Thomas, Rohan
> <rohan.g.thomas at intel.com>; intel-wired-lan at lists.osuosl.org; linux-
> kernel at vger.kernel.org; linux-rdma at vger.kernel.org; linux-stm32 at st-md-
> mailman.stormreply.com; linux-arm-kernel at lists.infradead.org;
> bpf at vger.kernel.org; leon at kernel.org
> Subject: [Intel-wired-lan] [PATCH net v2 3/3] net: stmmac: skip
> queueMaxSDU check for AF_XDP
> 
> Commit c5c3e1bfc9e0 ("net: stmmac: Offload queueMaxSDU from tc-
> taprio") was inspired by commit 92a0dcb8427d ("igc: offload queue max
> SDU from tc-taprio"), but the igc change does not apply the check to
> AF_XDP.
> 
> xsk_tx_peek_desc() reserves a completion entry. Continuing without
> queuing or completing the descriptor leaves the AF_XDP rings
> imbalanced, so remove the check from the zero-copy path.
> 
> The assumptions is that AF_XDP zero-copy traffic bypasses the qdisc,
' The assumptions is' -> ' The assumption is'

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>

> so taprio's queueMaxSDU check does not apply to this path.
> 
> Fixes: c5c3e1bfc9e0 ("net: stmmac: Offload queueMaxSDU from tc-
> taprio")
> Signed-off-by: Stanislav Fomichev <sdf at fomichev.me>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 62de03e65a90..4a82f4351303 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -2710,13 +2710,6 @@ static bool stmmac_xdp_xmit_zc(struct
> stmmac_priv *priv, u32 queue, u32 budget)
>  		if (!xsk_tx_peek_desc(pool, &xdp_desc))
>  			break;
> 
> -		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]++;
> -			continue;
> -		}
> -
>  		tx_desc = stmmac_get_tx_desc(priv, tx_q, entry);
>  		dma_addr = xsk_buff_raw_get_dma(pool, xdp_desc.addr);
>  		meta = xsk_buff_get_metadata(pool, xdp_desc.addr,
> --
> 2.53.0-Meta




More information about the linux-arm-kernel mailing list