According to the STM32MP151 documentation which covers dwmac v4.2, the hardware TSO feature can handle header lengths up to a maximum of 1023 bytes. Add a .ndo_features_check() method implementation to check the header length meets these requirements, otherwise fall back to software GSO. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 2957ee4a43db..e21ca1c70c6d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -4940,6 +4940,14 @@ static netdev_features_t stmmac_features_check(struct sk_buff *skb, queue = skb_get_queue_mapping(skb); if (!stmmac_channel_tso_permitted(netdev_priv(dev), queue)) features &= ~NETIF_F_GSO_MASK; + + /* STM32MP151 (dwmac v4.2) and STM32MP25xx (dwmac v5.3) states + * for TDES2 normal (read format) descriptor that the maximum + * header length supported for the TSO feature is 1023 bytes. + * Fall back to software GSO for these skbs. + */ + if (skb_headlen(skb) > 1023) + features &= ~NETIF_F_GSO_MASK; } return features; -- 2.47.3