Skip to contentSkip to conversation

mlx5: Add TSO support for UDP over GRE over VLAN

PATCH Applied Mark Bloch 2 participants 5 messages Jan 7 – Jan 12

Subsystems (5)
lore
Share & tools
lore

Mark Bloch

author maintainer
#0 lore raw

cover 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
author maintainer
#1 lore raw

PATCH 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
index 07fc4d2c8fad..1734c4dd1d0f 100644
@@ -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
author maintainer
#2 lore raw

PATCH 2/3 net/mlx5e: TSO for UDP over GRE over vlan packets

In reply to Mark Bloch

From: 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
index 1734c4dd1d0f..ce71a03a9b71 100644
@@ -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
author maintainer
#3 lore raw

PATCH 3/3 net/mlx5e: Remove GSO_PARTIAL for non _CSUM GRE

In reply to Mark Bloch

From: 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
index ce71a03a9b71..3ac47df83ac8 100644
@@ -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
#4 lore raw
In reply to Mark Bloch
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: Remove GSO_PARTIAL for non _CSUM GRE

[...]

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