linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
// Copyright (c) 2019 Mellanox Technologies.

#include <linux/debugfs.h>
#include "en_accel/ktls.h"
#include "en_accel/ktls_txrx.h"
#include "en_accel/ktls_utils.h"

struct mlx5e_dump_wqe {};

#define MLX5E_KTLS_DUMP_WQEBBS

static u8
mlx5e_ktls_dumps_num_wqes(struct mlx5e_params *params, unsigned int nfrags,
			  unsigned int sync_len)
{}

u16 mlx5e_ktls_get_stop_room(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
{}

static void mlx5e_ktls_set_tisc(struct mlx5_core_dev *mdev, void *tisc)
{}

static int mlx5e_ktls_create_tis(struct mlx5_core_dev *mdev, u32 *tisn)
{}

static int mlx5e_ktls_create_tis_cb(struct mlx5_core_dev *mdev,
				    struct mlx5_async_ctx *async_ctx,
				    u32 *out, int outlen,
				    mlx5_async_cbk_t callback,
				    struct mlx5_async_work *context)
{}

static int mlx5e_ktls_destroy_tis_cb(struct mlx5_core_dev *mdev, u32 tisn,
				     struct mlx5_async_ctx *async_ctx,
				     u32 *out, int outlen,
				     mlx5_async_cbk_t callback,
				     struct mlx5_async_work *context)
{}

struct mlx5e_ktls_offload_context_tx {};

static void
mlx5e_set_ktls_tx_priv_ctx(struct tls_context *tls_ctx,
			   struct mlx5e_ktls_offload_context_tx *priv_tx)
{}

static struct mlx5e_ktls_offload_context_tx *
mlx5e_get_ktls_tx_priv_ctx(struct tls_context *tls_ctx)
{}

/* struct for callback API management */
struct mlx5e_async_ctx {};

struct mlx5e_bulk_async_ctx {};

static struct mlx5e_bulk_async_ctx *mlx5e_bulk_async_init(struct mlx5_core_dev *mdev, int n)
{}

static void mlx5e_bulk_async_cleanup(struct mlx5e_bulk_async_ctx *bulk_async)
{}

static void create_tis_callback(int status, struct mlx5_async_work *context)
{}

static void destroy_tis_callback(int status, struct mlx5_async_work *context)
{}

static struct mlx5e_ktls_offload_context_tx *
mlx5e_tls_priv_tx_init(struct mlx5_core_dev *mdev, struct mlx5e_tls_sw_stats *sw_stats,
		       struct mlx5e_async_ctx *async)
{}

static void mlx5e_tls_priv_tx_cleanup(struct mlx5e_ktls_offload_context_tx *priv_tx,
				      struct mlx5e_async_ctx *async)
{}

static void mlx5e_tls_priv_tx_list_cleanup(struct mlx5_core_dev *mdev,
					   struct list_head *list, int size)
{}

/* Recycling pool API */

#define MLX5E_TLS_TX_POOL_BULK
#define MLX5E_TLS_TX_POOL_HIGH
#define MLX5E_TLS_TX_POOL_LOW

struct mlx5e_tls_tx_pool {};

static void create_work(struct work_struct *work)
{}

static void destroy_work(struct work_struct *work)
{}

static struct mlx5e_tls_tx_pool *mlx5e_tls_tx_pool_init(struct mlx5_core_dev *mdev,
							struct mlx5e_tls_sw_stats *sw_stats)
{}

static void mlx5e_tls_tx_pool_list_cleanup(struct mlx5e_tls_tx_pool *pool)
{}

static void mlx5e_tls_tx_pool_cleanup(struct mlx5e_tls_tx_pool *pool)
{}

static void pool_push(struct mlx5e_tls_tx_pool *pool, struct mlx5e_ktls_offload_context_tx *obj)
{}

static struct mlx5e_ktls_offload_context_tx *pool_pop(struct mlx5e_tls_tx_pool *pool)
{}

/* End of pool API */

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)
{}

static void tx_fill_wi(struct mlx5e_txqsq *sq,
		       u16 pi, u8 num_wqebbs, u32 num_bytes,
		       struct page *page)
{}

static bool
mlx5e_ktls_tx_offload_test_and_clear_pending(struct mlx5e_ktls_offload_context_tx *priv_tx)
{}

static void
post_static_params(struct mlx5e_txqsq *sq,
		   struct mlx5e_ktls_offload_context_tx *priv_tx,
		   bool fence)
{}

static void
post_progress_params(struct mlx5e_txqsq *sq,
		     struct mlx5e_ktls_offload_context_tx *priv_tx,
		     bool fence)
{}

static void tx_post_fence_nop(struct mlx5e_txqsq *sq)
{}

static void
mlx5e_ktls_tx_post_param_wqes(struct mlx5e_txqsq *sq,
			      struct mlx5e_ktls_offload_context_tx *priv_tx,
			      bool skip_static_post, bool fence_first_post)
{}

struct tx_sync_info {};

enum mlx5e_ktls_sync_retval {};

static enum mlx5e_ktls_sync_retval
tx_sync_info_get(struct mlx5e_ktls_offload_context_tx *priv_tx,
		 u32 tcp_seq, int datalen, struct tx_sync_info *info)
{}

static void
tx_post_resync_params(struct mlx5e_txqsq *sq,
		      struct mlx5e_ktls_offload_context_tx *priv_tx,
		      u64 rcd_sn)
{}

static int
tx_post_resync_dump(struct mlx5e_txqsq *sq, skb_frag_t *frag, u32 tisn)
{}

void mlx5e_ktls_tx_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
					   struct mlx5e_tx_wqe_info *wi,
					   u32 *dma_fifo_cc)
{}

static enum mlx5e_ktls_sync_retval
mlx5e_ktls_tx_handle_ooo(struct mlx5e_ktls_offload_context_tx *priv_tx,
			 struct mlx5e_txqsq *sq,
			 int datalen,
			 u32 seq)
{}

bool mlx5e_ktls_handle_tx_skb(struct net_device *netdev, struct mlx5e_txqsq *sq,
			      struct sk_buff *skb,
			      struct mlx5e_accel_tx_tls_state *state)
{}

static void mlx5e_tls_tx_debugfs_init(struct mlx5e_tls *tls,
				      struct dentry *dfs_root)
{}

int mlx5e_ktls_init_tx(struct mlx5e_priv *priv)
{}

void mlx5e_ktls_cleanup_tx(struct mlx5e_priv *priv)
{}