mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
net: stmmac: disable TX checksum offload for jumbo frames on bugged cores
stmmac_xdp_xmit_xdpf() decides TX checksum insertion from the queue COE capability only: csum = !priv->plat->tx_queues_cfg[queue].coe_unsupported; and lets the enhanced descriptor set TX_CIC_FULL accordingly. On the bugged_jumbo cores (snps,dwmac-3.40a, snps,dwmac-3.610 and snps,dwmac-3.710) hardware checksum insertion is broken for jumbo frames; the skb path works around it by clearing NETIF_F_CSUM_MASK in stmmac_fix_features() when the MTU exceeds ETH_DATA_LEN, so skbs are never marked CHECKSUM_PARTIAL and no checksum is inserted. The XDP TX path bypasses that workaround, so once XDP is allowed at MTU > ETH_DATA_LEN, jumbo frames sent via XDP_TX or redirected into the device would leave the interface with a full checksum insertion enabled on those cores - exactly what the workaround is meant to avoid. Disable checksum insertion for oversized frames on bugged_jumbo cores in the XDP TX path too. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261012-stmmac-xdp-tx-pre-fixes-v1-2-05fd0c90f7e1@oss.qualcomm.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
2d5c08ec15
commit
667a375a52
|
|
@ -5278,6 +5278,14 @@ static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
|
|||
return STMMAC_XDP_CONSUMED;
|
||||
}
|
||||
|
||||
/* Disable TX checksum offload for jumbo frames on cores where
|
||||
* checksum insertion is broken for oversized frames, matching the
|
||||
* stmmac_fix_features() workaround used by the skb path.
|
||||
*/
|
||||
if (priv->plat->bugged_jumbo &&
|
||||
xdp_get_frame_len(xdpf) > ETH_FRAME_LEN)
|
||||
csum = false;
|
||||
|
||||
while (true) {
|
||||
skb_frag_t *frag = i ? &sinfo->frags[i - 1] : NULL;
|
||||
int len = frag ? skb_frag_size(frag) : xdpf->len;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user