#ifndef __MLX5E_KTLS_UTILS_H__
#define __MLX5E_KTLS_UTILS_H__
#include <net/tls.h>
#include "en.h"
enum { … };
enum { … };
int mlx5e_ktls_add_tx(struct net_device *netdev, struct sock *sk,
struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn);
void mlx5e_ktls_del_tx(struct net_device *netdev, struct tls_context *tls_ctx);
int mlx5e_ktls_add_rx(struct net_device *netdev, struct sock *sk,
struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn);
void mlx5e_ktls_del_rx(struct net_device *netdev, struct tls_context *tls_ctx);
void mlx5e_ktls_rx_resync(struct net_device *netdev, struct sock *sk, u32 seq, u8 *rcd_sn);
mlx5e_crypto_info;
struct mlx5e_set_tls_static_params_wqe { … };
struct mlx5e_set_tls_progress_params_wqe { … };
struct mlx5e_get_tls_progress_params_wqe { … };
#define MLX5E_TLS_SET_STATIC_PARAMS_WQEBBS …
#define MLX5E_TLS_SET_PROGRESS_PARAMS_WQEBBS …
#define MLX5E_KTLS_GET_PROGRESS_WQEBBS …
#define MLX5E_TLS_FETCH_SET_STATIC_PARAMS_WQE(sq, pi) …
#define MLX5E_TLS_FETCH_SET_PROGRESS_PARAMS_WQE(sq, pi) …
#define MLX5E_TLS_FETCH_GET_PROGRESS_PARAMS_WQE(sq, pi) …
#define MLX5E_TLS_FETCH_DUMP_WQE(sq, pi) …
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