#include <crypto/internal/geniv.h>
#include <crypto/aead.h>
#include <linux/inetdevice.h>
#include <linux/netdevice.h>
#include <net/netevent.h>
#include "en.h"
#include "eswitch.h"
#include "ipsec.h"
#include "ipsec_rxtx.h"
#include "en_rep.h"
#define MLX5_IPSEC_RESCHED …
#define MLX5E_IPSEC_TUNNEL_SA …
static struct mlx5e_ipsec_sa_entry *to_ipsec_sa_entry(struct xfrm_state *x)
{ … }
static struct mlx5e_ipsec_pol_entry *to_ipsec_pol_entry(struct xfrm_policy *x)
{ … }
static void mlx5e_ipsec_handle_sw_limits(struct work_struct *_work)
{ … }
static bool mlx5e_ipsec_update_esn_state(struct mlx5e_ipsec_sa_entry *sa_entry)
{ … }
static void mlx5e_ipsec_init_limits(struct mlx5e_ipsec_sa_entry *sa_entry,
struct mlx5_accel_esp_xfrm_attrs *attrs)
{ … }
static void mlx5e_ipsec_init_macs(struct mlx5e_ipsec_sa_entry *sa_entry,
struct mlx5_accel_esp_xfrm_attrs *attrs)
{ … }
void mlx5e_ipsec_build_accel_xfrm_attrs(struct mlx5e_ipsec_sa_entry *sa_entry,
struct mlx5_accel_esp_xfrm_attrs *attrs)
{ … }
static int mlx5e_xfrm_validate_state(struct mlx5_core_dev *mdev,
struct xfrm_state *x,
struct netlink_ext_ack *extack)
{ … }
static void mlx5e_ipsec_modify_state(struct work_struct *_work)
{ … }
static void mlx5e_ipsec_set_esn_ops(struct mlx5e_ipsec_sa_entry *sa_entry)
{ … }
static void mlx5e_ipsec_handle_netdev_event(struct work_struct *_work)
{ … }
static int mlx5_ipsec_create_work(struct mlx5e_ipsec_sa_entry *sa_entry)
{ … }
static int mlx5e_ipsec_create_dwork(struct mlx5e_ipsec_sa_entry *sa_entry)
{ … }
static int mlx5e_xfrm_add_state(struct xfrm_state *x,
struct netlink_ext_ack *extack)
{ … }
static void mlx5e_xfrm_del_state(struct xfrm_state *x)
{ … }
static void mlx5e_xfrm_free_state(struct xfrm_state *x)
{ … }
static int mlx5e_ipsec_netevent_event(struct notifier_block *nb,
unsigned long event, void *ptr)
{ … }
void mlx5e_ipsec_init(struct mlx5e_priv *priv)
{ … }
void mlx5e_ipsec_cleanup(struct mlx5e_priv *priv)
{ … }
static bool mlx5e_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *x)
{ … }
static void mlx5e_xfrm_advance_esn_state(struct xfrm_state *x)
{ … }
static void mlx5e_xfrm_update_stats(struct xfrm_state *x)
{ … }
static int mlx5e_xfrm_validate_policy(struct mlx5_core_dev *mdev,
struct xfrm_policy *x,
struct netlink_ext_ack *extack)
{ … }
static void
mlx5e_ipsec_build_accel_pol_attrs(struct mlx5e_ipsec_pol_entry *pol_entry,
struct mlx5_accel_pol_xfrm_attrs *attrs)
{ … }
static int mlx5e_xfrm_add_policy(struct xfrm_policy *x,
struct netlink_ext_ack *extack)
{ … }
static void mlx5e_xfrm_del_policy(struct xfrm_policy *x)
{ … }
static void mlx5e_xfrm_free_policy(struct xfrm_policy *x)
{ … }
static const struct xfrmdev_ops mlx5e_ipsec_xfrmdev_ops = …;
void mlx5e_ipsec_build_netdev(struct mlx5e_priv *priv)
{ … }