linux/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/* Copyright (C) 2018 Netronome Systems, Inc */
/* Copyright (C) 2021 Corigine, Inc */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <asm/unaligned.h>
#include <linux/ktime.h>
#include <net/xfrm.h>

#include "../nfpcore/nfp_dev.h"
#include "../nfp_net_ctrl.h"
#include "../nfp_net.h"
#include "crypto.h"

#define NFP_NET_IPSEC_MAX_SA_CNT

/* IPsec config message cmd codes */
enum nfp_ipsec_cfg_mssg_cmd_codes {};

/* IPsec config message response codes */
enum nfp_ipsec_cfg_mssg_rsp_codes {};

/* Protocol */
enum nfp_ipsec_sa_prot {};

/* Mode */
enum nfp_ipsec_sa_mode {};

/* Cipher types */
enum nfp_ipsec_sa_cipher {};

/* Cipher modes */
enum nfp_ipsec_sa_cipher_mode {};

/* Hash types */
enum nfp_ipsec_sa_hash_type {};

/* IPSEC_CFG_MSSG_ADD_SA */
struct nfp_ipsec_cfg_add_sa {};

/* IPSEC_CFG_MSSG */
struct nfp_ipsec_cfg_mssg {};

static int nfp_net_ipsec_cfg(struct nfp_net *nn, struct nfp_mbox_amsg_entry *entry)
{}

static int set_aes_keylen(struct nfp_ipsec_cfg_add_sa *cfg, int alg, int keylen)
{}

static void set_md5hmac(struct nfp_ipsec_cfg_add_sa *cfg, int *trunc_len)
{}

static void set_sha1hmac(struct nfp_ipsec_cfg_add_sa *cfg, int *trunc_len)
{}

static void set_sha2_256hmac(struct nfp_ipsec_cfg_add_sa *cfg, int *trunc_len)
{}

static void set_sha2_384hmac(struct nfp_ipsec_cfg_add_sa *cfg, int *trunc_len)
{}

static void set_sha2_512hmac(struct nfp_ipsec_cfg_add_sa *cfg, int *trunc_len)
{}

static int nfp_net_xfrm_add_state(struct xfrm_state *x,
				  struct netlink_ext_ack *extack)
{}

static void nfp_net_xfrm_del_state(struct xfrm_state *x)
{}

static bool nfp_net_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *x)
{}

static const struct xfrmdev_ops nfp_net_ipsec_xfrmdev_ops =;

void nfp_net_ipsec_init(struct nfp_net *nn)
{}

void nfp_net_ipsec_clean(struct nfp_net *nn)
{}

bool nfp_net_ipsec_tx_prep(struct nfp_net_dp *dp, struct sk_buff *skb,
			   struct nfp_ipsec_offload *offload_info)
{}

int nfp_net_ipsec_rx(struct nfp_meta_parsed *meta, struct sk_buff *skb)
{}