summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoi Dayan <roid@nvidia.com>2021-04-29 11:13:35 +0200
committerSaeed Mahameed <saeedm@nvidia.com>2021-06-02 03:30:19 +0200
commitb38742e41177c339e891b74f3925862fa36debb1 (patch)
treea651af256c008abcccf519e7d01e4e3b5ca62027
parentnet/mlx5e: Fix incompatible casting (diff)
downloadlinux-b38742e41177c339e891b74f3925862fa36debb1.tar.xz
linux-b38742e41177c339e891b74f3925862fa36debb1.zip
net/mlx5e: Disable TLS offload for uplink representor
TLS offload is not supported in switchdev mode. Fixes: 7a9fb35e8c3a ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode") Signed-off-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index ad0f69480b9c..8eed2dcc8898 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3858,6 +3858,16 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,
netdev_warn(netdev, "Disabling rxhash, not supported when CQE compress is active\n");
}
+ if (mlx5e_is_uplink_rep(priv)) {
+ features &= ~NETIF_F_HW_TLS_RX;
+ if (netdev->features & NETIF_F_HW_TLS_RX)
+ netdev_warn(netdev, "Disabling hw_tls_rx, not supported in switchdev mode\n");
+
+ features &= ~NETIF_F_HW_TLS_TX;
+ if (netdev->features & NETIF_F_HW_TLS_TX)
+ netdev_warn(netdev, "Disabling hw_tls_tx, not supported in switchdev mode\n");
+ }
+
mutex_unlock(&priv->state_lock);
return features;