[PATCH net-next v2 00/14] net: stmmac: TSO fixes/cleanups
Russell King (Oracle)
linux at armlinux.org.uk
Wed Apr 1 05:41:33 PDT 2026
On Wed, Apr 01, 2026 at 02:19:27PM +0200, Andrew Lunn wrote:
> > I'm moving the setup of the GSO features, cleaning those up, and
> > adding a warning if platform glue requests this to be enabled but the
> > hardware has no support. Hopefully this will never trigger if everyone
> > got the STMMAC_FLAG_TSO_EN flag correct.
>
> Is this:
>
> snps,tso:
> $ref: /schemas/types.yaml#/definitions/flag
> description:
> Enables the TSO feature otherwise it will be managed by MAC HW capability
> register.
Like much of stmmac, this description is totally wrong.
snps,tso sets STMMAC_FLAG_TSO_EN in priv->plat->flags, and priv->tso in
unpatched stmmac:
/* Disable tso if asked by ethtool */
if ((priv->plat->flags & STMMAC_FLAG_TSO_EN) && (priv->dma_cap.tsoen)) {
if (features & NETIF_F_TSO)
priv->tso = true;
else
priv->tso = false;
}
and:
if ((priv->plat->flags & STMMAC_FLAG_TSO_EN) && (priv->dma_cap.tsoen)) {
ndev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6;
if (priv->plat->core_type == DWMAC_CORE_GMAC4)
ndev->hw_features |= NETIF_F_GSO_UDP_L4;
priv->tso = true;
dev_info(priv->device, "TSO feature enabled\n");
}
So, basically, TSO is only enabled when both the hardware supports it
_and_ snps,tso is specified.
Whereas the description suggests that snps,tso overrides the hardware
if it's specified, otherwise the hardware capability is used.
Given that the hardware capability says whether the hardware is, umm,
*capable* of TSO... yea, DT binding is basically wrong.
Now, how many of those snps.tso in DT are ignored because the hardware
doesn't support TSO... I guess we'll find out!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list