diff mbox series

[D,SRU,1/4] net/mlx5e: Report netdevice MPLS features

Message ID 20200408065605.12060-6-po-hsu.lin@canonical.com
State New
Headers show
Series [D,SRU,1/4] net/mlx5e: Report netdevice MPLS features | expand

Commit Message

Po-Hsu Lin April 8, 2020, 6:56 a.m. UTC
From: Ariel Levkovich <lariel@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@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
(cherry picked from commit 5dc9520bf04a6b95660a307d7654460d1463d91a)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++
 1 file changed, 5 insertions(+)
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 7d9163d..1235a88 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4697,6 +4697,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;
+
 	netdev->hw_enc_features  |= NETIF_F_HW_VLAN_CTAG_TX;
 	netdev->hw_enc_features  |= NETIF_F_HW_VLAN_CTAG_RX;