diff mbox series

[net-next] net/mlx5e: allow TSO on VXLAN over VLAN topologies

Message ID c1f4cc6214c28ce9a39147db9f3b66927dbae612.1578567988.git.dcaratti@redhat.com
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series [net-next] net/mlx5e: allow TSO on VXLAN over VLAN topologies | expand

Commit Message

Davide Caratti Jan. 9, 2020, 11:07 a.m. UTC
since mlx5 hardware can segment correctly TSO packets on VXLAN over VLAN
topologies, CPU usage can improve significantly if we enable tunnel
offloads in dev->vlan_features, like it was done in the past with other
NIC drivers (e.g. mlx4, be2net and ixgbe).

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller Jan. 9, 2020, 6:52 p.m. UTC | #1
From: Davide Caratti <dcaratti@redhat.com>
Date: Thu,  9 Jan 2020 12:07:59 +0100

> since mlx5 hardware can segment correctly TSO packets on VXLAN over VLAN
> topologies, CPU usage can improve significantly if we enable tunnel
> offloads in dev->vlan_features, like it was done in the past with other
> NIC drivers (e.g. mlx4, be2net and ixgbe).
> 
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>

Saeed, I am assuming you will review and integrate this.

Thank you.
Saeed Mahameed Jan. 14, 2020, 8:33 p.m. UTC | #2
On Thu, 2020-01-09 at 10:52 -0800, David Miller wrote:
> From: Davide Caratti <dcaratti@redhat.com>
> Date: Thu,  9 Jan 2020 12:07:59 +0100
> 
> > since mlx5 hardware can segment correctly TSO packets on VXLAN over
> VLAN
> > topologies, CPU usage can improve significantly if we enable tunnel
> > offloads in dev->vlan_features, like it was done in the past with
> other
> > NIC drivers (e.g. mlx4, be2net and ixgbe).
> > 
> > Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> 
> Saeed, I am assuming you will review and integrate this.
> 
> Thank you.

LGTM, applied to net-next-mlx5, will run some tests and provide
feedback if any issues will surface, while i don't expect any.

Will submit to net-next in one of my upcoming net-next pull requests.

Thanks,
Saeed.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 78737fd42616..87267c18ff8c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4878,6 +4878,8 @@  static void mlx5e_build_nic_netdev(struct net_device *netdev)
 		netdev->hw_enc_features |= NETIF_F_GSO_UDP_TUNNEL |
 					   NETIF_F_GSO_UDP_TUNNEL_CSUM;
 		netdev->gso_partial_features = NETIF_F_GSO_UDP_TUNNEL_CSUM;
+		netdev->vlan_features |= NETIF_F_GSO_UDP_TUNNEL |
+					 NETIF_F_GSO_UDP_TUNNEL_CSUM;
 	}
 
 	if (mlx5e_tunnel_proto_supported(mdev, IPPROTO_GRE)) {