]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net/mlx5e: Report netdevice MPLS features
authorAriel Levkovich <lariel@mellanox.com>
Wed, 8 Apr 2020 06:55:58 +0000 (14:55 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 29 Apr 2020 12:56:17 +0000 (14:56 +0200)
BugLink: https://bugs.launchpad.net/bugs/1851446
Set supported device features in the netdevice MPLS features mask.
This will enable HW checksumming and TSO for MPLS tagged traffic.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
(backported from commit 5dc9520bf04a6b95660a307d7654460d1463d91a)
[PHLin: context adjustment]
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Sultan Alsawaf <sultan.alsawaf@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index 98374a14ed57f9017ef41f441291f1b5921e0da6..56f9684dd17ae2573257e90ad61903d6ddea5d10 100644 (file)
@@ -4230,6 +4230,11 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
        netdev->vlan_features    |= NETIF_F_RXCSUM;
        netdev->vlan_features    |= NETIF_F_RXHASH;
 
+       netdev->mpls_features    |= NETIF_F_SG;
+       netdev->mpls_features    |= NETIF_F_HW_CSUM;
+       netdev->mpls_features    |= NETIF_F_TSO;
+       netdev->mpls_features    |= NETIF_F_TSO6;
+
        if (!!MLX5_CAP_ETH(mdev, lro_cap))
                netdev->vlan_features    |= NETIF_F_LRO;