Loading drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ #include "mlx5_core.h" #include "en.h" #include "ipsec.h" #include "lib/mlx5.h" #include "lib/crypto.h" enum { MLX5_IPSEC_ASO_REMOVE_FLOW_PKT_CNT_OFFSET, Loading drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #include <linux/debugfs.h> #include "en.h" #include "lib/mlx5.h" #include "lib/crypto.h" #include "en_accel/ktls.h" #include "en_accel/ktls_utils.h" #include "en_accel/fs_tcp.h" Loading drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ #include "en.h" #include "lib/aso.h" #include "lib/mlx5.h" #include "lib/crypto.h" #include "en_accel/macsec.h" #include "en_accel/macsec_fs.h" Loading drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ // Copyright (c) 2019 Mellanox Technologies. #include "mlx5_core.h" #include "lib/mlx5.h" #include "lib/crypto.h" int mlx5_create_encryption_key(struct mlx5_core_dev *mdev, void *key, u32 sz_bytes, Loading drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.h 0 → 100644 +19 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ /* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #ifndef __MLX5_LIB_CRYPTO_H__ #define __MLX5_LIB_CRYPTO_H__ enum { MLX5_ACCEL_OBJ_TLS_KEY = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_TYPE_TLS, MLX5_ACCEL_OBJ_IPSEC_KEY = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_TYPE_IPSEC, MLX5_ACCEL_OBJ_MACSEC_KEY = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_TYPE_MACSEC, }; int mlx5_create_encryption_key(struct mlx5_core_dev *mdev, void *key, u32 sz_bytes, u32 key_type, u32 *p_key_id); void mlx5_destroy_encryption_key(struct mlx5_core_dev *mdev, u32 key_id); #endif /* __MLX5_LIB_CRYPTO_H__ */ Loading
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ #include "mlx5_core.h" #include "en.h" #include "ipsec.h" #include "lib/mlx5.h" #include "lib/crypto.h" enum { MLX5_IPSEC_ASO_REMOVE_FLOW_PKT_CNT_OFFSET, Loading
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #include <linux/debugfs.h> #include "en.h" #include "lib/mlx5.h" #include "lib/crypto.h" #include "en_accel/ktls.h" #include "en_accel/ktls_utils.h" #include "en_accel/fs_tcp.h" Loading
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ #include "en.h" #include "lib/aso.h" #include "lib/mlx5.h" #include "lib/crypto.h" #include "en_accel/macsec.h" #include "en_accel/macsec_fs.h" Loading
drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ // Copyright (c) 2019 Mellanox Technologies. #include "mlx5_core.h" #include "lib/mlx5.h" #include "lib/crypto.h" int mlx5_create_encryption_key(struct mlx5_core_dev *mdev, void *key, u32 sz_bytes, Loading
drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.h 0 → 100644 +19 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ /* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #ifndef __MLX5_LIB_CRYPTO_H__ #define __MLX5_LIB_CRYPTO_H__ enum { MLX5_ACCEL_OBJ_TLS_KEY = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_TYPE_TLS, MLX5_ACCEL_OBJ_IPSEC_KEY = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_TYPE_IPSEC, MLX5_ACCEL_OBJ_MACSEC_KEY = MLX5_GENERAL_OBJECT_TYPE_ENCRYPTION_KEY_TYPE_MACSEC, }; int mlx5_create_encryption_key(struct mlx5_core_dev *mdev, void *key, u32 sz_bytes, u32 key_type, u32 *p_key_id); void mlx5_destroy_encryption_key(struct mlx5_core_dev *mdev, u32 key_id); #endif /* __MLX5_LIB_CRYPTO_H__ */