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

"Loktionov, Aleksandr" <[email protected]>
Newsgroups org.kernel.vger.bpf,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rdma,org.kernel.vger.netdev,org.osuosl.intel-wired-lan
Message-ID <IA3PR11MB89868E697B08DE8977FCA9AEE5A62@IA3PR11MB8986.namprd11.prod.outlook.com>

> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Stanislav Fomichev
> Sent: Thursday, August 13, 2026 9:08 PM
> To: [email protected]
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; Nguyen, Anthony L <[email protected]>;
> Kitszel, Przemyslaw <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; Lobakin,
> Aleksander <[email protected]>; [email protected]; Karlsson,
> Magnus <[email protected]>; Fijalkowski, Maciej
> <[email protected]>; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Song, Yoong Siang
> <[email protected]>; G Thomas, Rohan
> <[email protected]>; [email protected]; linux-
> [email protected]; [email protected]; linux-stm32@st-md-
> mailman.stormreply.com; [email protected];
> [email protected]; [email protected]
> 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 <[email protected]>

> 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 <[email protected]>
> ---
>  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
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.