net/mlx5e: Support partial GSO for tunnels over vlans
authorGal Pressman <gal@nvidia.com>
Thu, 31 Mar 2022 06:26:00 +0000 (09:26 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 18 May 2022 06:41:47 +0000 (23:41 -0700)
Offloading outer checksum on tunnels requires GSO partial, add it to
'vlan_features' to allow offloading tunnels over vlans.
For example, running GENEVE over vlan & ipv6 (mandatory UDP checksum)
now allows for hardware TSO instead of software segmentation in GSO
only.

Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index bf3bca7..29e1e1f 100644 (file)
@@ -4812,6 +4812,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
        netdev->vlan_features    |= NETIF_F_TSO6;
        netdev->vlan_features    |= NETIF_F_RXCSUM;
        netdev->vlan_features    |= NETIF_F_RXHASH;
+       netdev->vlan_features    |= NETIF_F_GSO_PARTIAL;
 
        netdev->mpls_features    |= NETIF_F_SG;
        netdev->mpls_features    |= NETIF_F_HW_CSUM;
@@ -4877,7 +4878,6 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
                                                NETIF_F_GSO_IPXIP6;
        }
 
-       netdev->hw_features                      |= NETIF_F_GSO_PARTIAL;
        netdev->gso_partial_features             |= NETIF_F_GSO_UDP_L4;
        netdev->hw_features                      |= NETIF_F_GSO_UDP_L4;
        netdev->features                         |= NETIF_F_GSO_UDP_L4;