mlx5: Add TSO support for UDP over GRE over VLAN
Subsystems (5)
Mark Bloch
maintainercover mlx5: Add TSO support for UDP over GRE over VLAN
Hi,
The following 3 small patches by Gal add support for TSO for UDP over GRE over VLAN packets.
Gal Pressman (3):
net/mlx5e: TSO for GRE over vlan net/mlx5e: TSO for UDP over GRE over vlan packets net/mlx5e: Remove GSO_PARTIAL for non _CSUM GRE
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
base-commit: 956f569c90ab507559342d289f4c923adfbf06f5
Signature · 1 line
2.34.1
Mark Bloch
maintainerPATCH 1/3 net/mlx5e: TSO for GRE over vlan
From: Gal Pressman <[email protected]>
The hardware supports segmentation offload of GRE tunnel over vlan, allow it by adding it to vlan_features.
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1 -0
@@ -5800,6 +5800,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)NETIF_F_GSO_GRE_CSUM ; netdev->gso_partial_features |=NETIF_F_GSO_GRE |NETIF_F_GSO_GRE_CSUM ; + netdev->vlan_features |=NETIF_F_GSO_GRE |NETIF_F_GSO_GRE_CSUM ; }if (mlx5e_tunnel_proto_supported_tx (mdev,IPPROTO_IPIP )) {
Signature · 1 line
2.34.1
Mark Bloch
maintainerPATCH 2/3 net/mlx5e: TSO for UDP over GRE over vlan packets
In reply to Mark BlochFrom: Gal Pressman <[email protected]>
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.
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1 -0
@@ -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);
Signature · 1 line
2.34.1
Mark Bloch
maintainerPATCH 3/3 net/mlx5e: Remove GSO_PARTIAL for non _CSUM GRE
In reply to Mark BlochFrom: Gal Pressman <[email protected]>
The hardware can do TSO for GRE packets without an outer checksum, it doesn't need GSO_PARTIAL's help.
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1 -2
@@ -5798,8 +5798,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)NETIF_F_GSO_GRE_CSUM ; netdev->hw_enc_features |=NETIF_F_GSO_GRE |NETIF_F_GSO_GRE_CSUM ; - netdev->gso_partial_features |=NETIF_F_GSO_GRE | -NETIF_F_GSO_GRE_CSUM ; + netdev->gso_partial_features |=NETIF_F_GSO_GRE_CSUM ; netdev->vlan_features |=NETIF_F_GSO_GRE |NETIF_F_GSO_GRE_CSUM ; }
Signature · 1 line
2.34.1
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Wed, 7 Jan 2026 11:18:45 +0200 you wrote:
Hi,
The following 3 small patches by Gal add support for TSO for UDP over GRE over VLAN packets.
Gal Pressman (3):
net/mlx5e: TSO for GRE over vlan net/mlx5e: TSO for UDP over GRE over vlan packets net/mlx5e: RemoveGSO_PARTIALfor non_CSUMGRE[...]
Here is the summary with links:
- [net-next,1/3] net/mlx5e: TSO for GRE over vlan
https://git.kernel.org/netdev/net-next/c/6e6c751b41a8 - [net-next,2/3] net/mlx5e: TSO for UDP over GRE over vlan packets https://git.kernel.org/netdev/net-next/c/5f410e1224e4 - [net-next,3/3] net/mlx5e: Remove GSO_PARTIAL for non _CSUM GRE https://git.kernel.org/netdev/net-next/c/b30ba673058d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html