[B][SRU][PATCH 1/4] net/mlx5e: Report netdevice MPLS features

Po-Hsu Lin po-hsu.lin at canonical.com
Wed Apr 8 06:55:58 UTC 2020


From: Ariel Levkovich <lariel at mellanox.com>

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 at mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm at mellanox.com>
(backported from commit 5dc9520bf04a6b95660a307d7654460d1463d91a)
[PHLin: context adjustment]
Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index e39bb0c..78b0635 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4225,6 +4225,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;
 
-- 
2.7.4




More information about the kernel-team mailing list