diff options
author | Gal Pressman <gal@nvidia.com> | 2022-07-13 12:57:03 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-07-28 22:44:18 +0200 |
commit | 115d9f95ea7ab780ef315dc356bebba2e07cb731 (patch) | |
tree | 8fca6d4b19a651ef5286cfcb524b82783963bbd4 /drivers/net | |
parent | stmmac: dwmac-mediatek: fix resource leak in probe (diff) | |
download | linux-115d9f95ea7ab780ef315dc356bebba2e07cb731.tar.xz linux-115d9f95ea7ab780ef315dc356bebba2e07cb731.zip |
net/mlx5e: Remove WARN_ON when trying to offload an unsupported TLS cipher/version
The driver reports whether TX/RX TLS device offloads are supported, but
not which ciphers/versions, these should be handled by returning
-EOPNOTSUPP when .tls_dev_add() is called.
Remove the WARN_ON kernel trace when the driver gets a request to
offload a cipher/version that is not supported as it is expected.
Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c index 814f2a56f633..30a70d139046 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c @@ -54,7 +54,7 @@ static int mlx5e_ktls_add(struct net_device *netdev, struct sock *sk, struct mlx5_core_dev *mdev = priv->mdev; int err; - if (WARN_ON(!mlx5e_ktls_type_check(mdev, crypto_info))) + if (!mlx5e_ktls_type_check(mdev, crypto_info)) return -EOPNOTSUPP; if (direction == TLS_OFFLOAD_CTX_DIR_TX) |