]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/mlx5e: TSO for UDP over GRE over vlan packets
authorGal Pressman <gal@nvidia.com>
Wed, 7 Jan 2026 09:18:47 +0000 (11:18 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Jan 2026 20:03:54 +0000 (12:03 -0800)
The hardware supports segmentation offload of UDP over GRE over vlan
packets, allow it by adding NETIF_F_GSO_UDP_L4 to hw_enc_features which
will make the vlan device inherit it to its own hw_enc_features.

Side note: it is quite confusing that this change wasn't needed to
offload encapsulated UDP packets regardless of vlan, but that's the way
that the stack handles gso partial features, it assumes they're
supported without caring if the feature is supported in hw_enc_features.

Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20260107091848.621884-3-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index 1734c4dd1d0f50a5d771ebe08b546a8d6d8167e2..ce71a03a9b71a82a22bd4fb1164422ba364c255f 100644 (file)
@@ -5814,6 +5814,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
 
        netdev->gso_partial_features             |= NETIF_F_GSO_UDP_L4;
        netdev->hw_features                      |= NETIF_F_GSO_UDP_L4;
+       netdev->hw_enc_features                  |= NETIF_F_GSO_UDP_L4;
 
        mlx5_query_port_fcs(mdev, &fcs_supported, &fcs_enabled);