From: Tariq Toukan Date: Sun, 21 Jul 2019 11:13:15 +0000 (+0300) Subject: net/mlx5: crypto, Fix wrong offset in encryption key command X-Git-Tag: v5.3-rc6~33^2~41^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55c9bd37ef5a0bd79c80c8eb418ce162bbc65590;p=thirdparty%2Fkernel%2Flinux.git net/mlx5: crypto, Fix wrong offset in encryption key command Fix the 128b key offset in key encryption key creation command, per the HW specification. Fixes: 45d3b55dc665 ("net/mlx5: Add crypto library to support create/destroy encryption key") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c index ea9ee88491e5d..ea1d4d26ece06 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c @@ -27,6 +27,7 @@ int mlx5_create_encryption_key(struct mlx5_core_dev *mdev, case 128: general_obj_key_size = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_KEY_SIZE_128; + key_p += sz_bytes; break; case 256: general_obj_key_size =