Skip to content

Commit 83a59ce

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: Block TLS device offload on combined SD netdev
1) Each TX TLS device offloaded context has its own TIS object. Extra work is needed to get it working in a SD environment, where a stream can move between different SQs (belonging to different mdevs). 2) Each RX TLS device offloaded context needs a DEK object from the DEK pool. Extra work is needed to get it working in a SD environment, as the DEK pool currently falsely depends on TX cap, and is on the primary device only. Disallow this combination for now. Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent d72bace commit 83a59ce

File tree

2 files changed

+4
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en_accel

2 files changed

+4
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ bool mlx5e_is_ktls_rx(struct mlx5_core_dev *mdev)
9696
{
9797
u8 max_sq_wqebbs = mlx5e_get_max_sq_wqebbs(mdev);
9898

99-
if (is_kdump_kernel() || !MLX5_CAP_GEN(mdev, tls_rx))
99+
if (is_kdump_kernel() || !MLX5_CAP_GEN(mdev, tls_rx) || mlx5_get_sd(mdev))
100100
return false;
101101

102102
/* Check the possibility to post the required ICOSQ WQEs. */

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#ifdef CONFIG_MLX5_EN_TLS
1313
#include "lib/crypto.h"
14+
#include "lib/mlx5.h"
1415

1516
struct mlx5_crypto_dek *mlx5_ktls_create_key(struct mlx5_crypto_dek_pool *dek_pool,
1617
struct tls_crypto_info *crypto_info);
@@ -61,7 +62,8 @@ void mlx5e_ktls_rx_resync_destroy_resp_list(struct mlx5e_ktls_resync_resp *resp_
6162

6263
static inline bool mlx5e_is_ktls_tx(struct mlx5_core_dev *mdev)
6364
{
64-
return !is_kdump_kernel() && MLX5_CAP_GEN(mdev, tls_tx);
65+
return !is_kdump_kernel() && MLX5_CAP_GEN(mdev, tls_tx) &&
66+
!mlx5_get_sd(mdev);
6567
}
6668

6769
bool mlx5e_is_ktls_rx(struct mlx5_core_dev *mdev);

0 commit comments

Comments
 (0)