]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: Disable TLS offload for uplink representor
authorRoi Dayan <roid@nvidia.com>
Thu, 29 Apr 2021 09:13:35 +0000 (12:13 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 2 Jun 2021 01:30:19 +0000 (18:30 -0700)
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>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index ad0f69480b9ca1d3c8609b01da74c4be4acc28b2..8eed2dcc8898daac203b2857e0e7bed67da196e8 100644 (file)
@@ -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;