#include <linux/bitfield.h>
#include <linux/ipv6.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <net/inet6_hashtables.h>
#include <net/tls.h>
#include "../ccm.h"
#include "../nfp_net.h"
#include "crypto.h"
#include "fw.h"
#define NFP_NET_TLS_CCM_MBOX_OPS_MASK …
#define NFP_NET_TLS_OPCODE_MASK_RX …
#define NFP_NET_TLS_OPCODE_MASK_TX …
#define NFP_NET_TLS_OPCODE_MASK …
static void nfp_net_crypto_set_op(struct nfp_net *nn, u8 opcode, bool on)
{ … }
static bool
__nfp_net_tls_conn_cnt_changed(struct nfp_net *nn, int add,
enum tls_offload_ctx_dir direction)
{ … }
static int
nfp_net_tls_conn_cnt_changed(struct nfp_net *nn, int add,
enum tls_offload_ctx_dir direction)
{ … }
static int
nfp_net_tls_conn_add(struct nfp_net *nn, enum tls_offload_ctx_dir direction)
{ … }
static int
nfp_net_tls_conn_remove(struct nfp_net *nn, enum tls_offload_ctx_dir direction)
{ … }
static struct sk_buff *
nfp_net_tls_alloc_simple(struct nfp_net *nn, size_t req_sz, gfp_t flags)
{ … }
static int
nfp_net_tls_communicate_simple(struct nfp_net *nn, struct sk_buff *skb,
const char *name, enum nfp_ccm_type type)
{ … }
static void nfp_net_tls_del_fw(struct nfp_net *nn, __be32 *fw_handle)
{ … }
static void
nfp_net_tls_set_ipver_vlan(struct nfp_crypto_req_add_front *front, u8 ipver)
{ … }
static void
nfp_net_tls_assign_conn_id(struct nfp_net *nn,
struct nfp_crypto_req_add_front *front)
{ … }
static struct nfp_crypto_req_add_back *
nfp_net_tls_set_ipv4(struct nfp_net *nn, struct nfp_crypto_req_add_v4 *req,
struct sock *sk, int direction)
{ … }
static struct nfp_crypto_req_add_back *
nfp_net_tls_set_ipv6(struct nfp_net *nn, struct nfp_crypto_req_add_v6 *req,
struct sock *sk, int direction)
{ … }
static void
nfp_net_tls_set_l4(struct nfp_crypto_req_add_front *front,
struct nfp_crypto_req_add_back *back, struct sock *sk,
int direction)
{ … }
static u8 nfp_tls_1_2_dir_to_opcode(enum tls_offload_ctx_dir direction)
{ … }
static bool
nfp_net_cipher_supported(struct nfp_net *nn, u16 cipher_type,
enum tls_offload_ctx_dir direction)
{ … }
static int
nfp_net_tls_add(struct net_device *netdev, struct sock *sk,
enum tls_offload_ctx_dir direction,
struct tls_crypto_info *crypto_info,
u32 start_offload_tcp_sn)
{ … }
static void
nfp_net_tls_del(struct net_device *netdev, struct tls_context *tls_ctx,
enum tls_offload_ctx_dir direction)
{ … }
static int
nfp_net_tls_resync(struct net_device *netdev, struct sock *sk, u32 seq,
u8 *rcd_sn, enum tls_offload_ctx_dir direction)
{ … }
static const struct tlsdev_ops nfp_net_tls_ops = …;
int nfp_net_tls_rx_resync_req(struct net_device *netdev,
struct nfp_net_tls_resync_req *req,
void *pkt, unsigned int pkt_len)
{ … }
static int nfp_net_tls_reset(struct nfp_net *nn)
{ … }
int nfp_net_tls_init(struct nfp_net *nn)
{ … }