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

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_utils.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_utils.h
Extension
.h
Size
3360 bytes
Lines
92
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mlx5e_set_tls_static_params_wqe {
	struct mlx5_wqe_ctrl_seg ctrl;
	struct mlx5_wqe_umr_ctrl_seg uctrl;
	struct mlx5_mkey_seg mkc;
	struct mlx5_wqe_tls_static_params_seg params;
};

struct mlx5e_set_tls_progress_params_wqe {
	struct mlx5_wqe_ctrl_seg ctrl;
	struct mlx5_wqe_tls_progress_params_seg params;
};

struct mlx5e_get_tls_progress_params_wqe {
	struct mlx5_wqe_ctrl_seg ctrl;
	struct mlx5_seg_get_psv  psv;
};

#define MLX5E_TLS_SET_STATIC_PARAMS_WQEBBS \
	(DIV_ROUND_UP(sizeof(struct mlx5e_set_tls_static_params_wqe), MLX5_SEND_WQE_BB))

#define MLX5E_TLS_SET_PROGRESS_PARAMS_WQEBBS \
	(DIV_ROUND_UP(sizeof(struct mlx5e_set_tls_progress_params_wqe), MLX5_SEND_WQE_BB))

#define MLX5E_KTLS_GET_PROGRESS_WQEBBS \
	(DIV_ROUND_UP(sizeof(struct mlx5e_get_tls_progress_params_wqe), MLX5_SEND_WQE_BB))

#define MLX5E_TLS_FETCH_SET_STATIC_PARAMS_WQE(sq, pi) \
	((struct mlx5e_set_tls_static_params_wqe *)\
	 mlx5e_fetch_wqe(&(sq)->wq, pi, sizeof(struct mlx5e_set_tls_static_params_wqe)))

#define MLX5E_TLS_FETCH_SET_PROGRESS_PARAMS_WQE(sq, pi) \
	((struct mlx5e_set_tls_progress_params_wqe *)\
	 mlx5e_fetch_wqe(&(sq)->wq, pi, sizeof(struct mlx5e_set_tls_progress_params_wqe)))

#define MLX5E_TLS_FETCH_GET_PROGRESS_PARAMS_WQE(sq, pi) \
	((struct mlx5e_get_tls_progress_params_wqe *)\
	 mlx5e_fetch_wqe(&(sq)->wq, pi, sizeof(struct mlx5e_get_tls_progress_params_wqe)))

#define MLX5E_TLS_FETCH_DUMP_WQE(sq, pi) \
	((struct mlx5e_dump_wqe *)\
	 mlx5e_fetch_wqe(&(sq)->wq, pi, sizeof(struct mlx5e_dump_wqe)))

void
mlx5e_ktls_build_static_params(struct mlx5e_set_tls_static_params_wqe *wqe,
			       u16 pc, u32 sqn,
			       union mlx5e_crypto_info *crypto_info,
			       u32 tis_tir_num, u32 key_id, u32 resync_tcp_sn,
			       bool fence, enum tls_offload_ctx_dir direction);
void
mlx5e_ktls_build_progress_params(struct mlx5e_set_tls_progress_params_wqe *wqe,
				 u16 pc, u32 sqn,
				 u32 tis_tir_num, bool fence,
				 u32 next_record_tcp_sn,
				 enum tls_offload_ctx_dir direction);

#endif /* __MLX5E_TLS_UTILS_H__ */

Annotation

Implementation Notes