FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ipsec.h File Reference
+ Include dependency graph for ipsec.h:

Go to the source code of this file.

Data Structures

struct  dpdk_gcm_cnt_blk
 
struct  dpdk_op_priv_t
 
struct  crypto_worker_main_t
 
struct  crypto_alg_t
 
struct  crypto_dev_t
 
struct  crypto_drv_t
 
struct  crypto_resource_t
 
struct  crypto_session_disposal_t
 
struct  crypto_session_by_drv_t
 
struct  crypto_data_t
 
struct  dpdk_crypto_main_t
 

Macros

#define always_inline   static inline
 
#define DPDK_CRYPTO_N_QUEUE_DESC   2048
 
#define DPDK_CRYPTO_NB_SESS_OBJS   20000
 
#define foreach_dpdk_crypto_input_next
 
#define MAX_QP_PER_LCORE   16
 

Enumerations

enum  dpdk_crypto_input_next_t { DPDK_CRYPTO_INPUT_N_NEXT }
 

Functions

void crypto_auto_placement (void)
 
clib_error_tcreate_sym_session (struct rte_cryptodev_sym_session **session, u32 sa_idx, crypto_resource_t *res, crypto_worker_main_t *cwm, u8 is_outbound)
 
static_always_inline u32 crypto_op_len (void)
 
static_always_inline u32 crypto_op_get_priv_offset (void)
 
static_always_inline dpdk_op_priv_tcrypto_op_get_priv (struct rte_crypto_op *op)
 
static_always_inline void add_session_by_drv_and_sa_idx (struct rte_cryptodev_sym_session *session, crypto_data_t *data, u32 drv_id, u32 sa_idx)
 
static_always_inline struct rte_cryptodev_sym_session * get_session_by_drv_and_sa_idx (crypto_data_t *data, u32 drv_id, u32 sa_idx)
 
static_always_inline clib_error_tcrypto_get_session (struct rte_cryptodev_sym_session **session, u32 sa_idx, crypto_resource_t *res, crypto_worker_main_t *cwm, u8 is_outbound)
 
static_always_inline u16 get_resource (crypto_worker_main_t *cwm, ipsec_sa_t *sa)
 
static_always_inline i32 crypto_alloc_ops (u8 numa, struct rte_crypto_op **ops, u32 n)
 
static_always_inline void crypto_free_ops (u8 numa, struct rte_crypto_op **ops, u32 n)
 
static_always_inline void crypto_enqueue_ops (vlib_main_t *vm, crypto_worker_main_t *cwm, u32 node_index, u32 error, u8 numa, u8 encrypt)
 
static_always_inline void crypto_set_icb (dpdk_gcm_cnt_blk *icb, u32 salt, u32 seq, u32 seq_hi)
 
static_always_inline void crypto_op_setup (u8 is_aead, struct rte_mbuf *mb0, struct rte_crypto_op *op, void *session, u32 cipher_off, u32 cipher_len, u32 auth_off, u32 auth_len, u8 *aad, u8 *digest, u64 digest_paddr)
 

Variables

dpdk_crypto_main_t dpdk_crypto_main
 
static const u8 pad_data []
 

Macro Definition Documentation

◆ always_inline

#define always_inline   static inline

Definition at line 29 of file ipsec.h.

◆ DPDK_CRYPTO_N_QUEUE_DESC

#define DPDK_CRYPTO_N_QUEUE_DESC   2048

Definition at line 34 of file ipsec.h.

◆ DPDK_CRYPTO_NB_SESS_OBJS

#define DPDK_CRYPTO_NB_SESS_OBJS   20000

Definition at line 35 of file ipsec.h.

◆ foreach_dpdk_crypto_input_next

#define foreach_dpdk_crypto_input_next
Value:
_(DROP, "error-drop") \
_(IP4_LOOKUP, "ip4-lookup") \
_(IP6_LOOKUP, "ip6-lookup") \
_(INTERFACE_OUTPUT, "interface-output") \
_(MIDCHAIN, "adj-midchain-tx") \
_(DECRYPT4_POST, "dpdk-esp4-decrypt-post") \
_(DECRYPT6_POST, "dpdk-esp6-decrypt-post")

Definition at line 37 of file ipsec.h.

◆ MAX_QP_PER_LCORE

#define MAX_QP_PER_LCORE   16

Definition at line 54 of file ipsec.h.

Enumeration Type Documentation

◆ dpdk_crypto_input_next_t

Enumerator
DPDK_CRYPTO_INPUT_N_NEXT 

Definition at line 46 of file ipsec.h.

Function Documentation

◆ add_session_by_drv_and_sa_idx()

static_always_inline void add_session_by_drv_and_sa_idx ( struct rte_cryptodev_sym_session *  session,
crypto_data_t data,
u32  drv_id,
u32  sa_idx 
)

Definition at line 216 of file ipsec.h.

+ Here is the caller graph for this function:

◆ create_sym_session()

clib_error_t* create_sym_session ( struct rte_cryptodev_sym_session **  session,
u32  sa_idx,
crypto_resource_t res,
crypto_worker_main_t cwm,
u8  is_outbound 
)

Definition at line 322 of file ipsec.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypto_alloc_ops()

static_always_inline i32 crypto_alloc_ops ( u8  numa,
struct rte_crypto_op **  ops,
u32  n 
)

Definition at line 285 of file ipsec.h.

+ Here is the caller graph for this function:

◆ crypto_auto_placement()

void crypto_auto_placement ( void  )

Definition at line 729 of file ipsec.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypto_enqueue_ops()

static_always_inline void crypto_enqueue_ops ( vlib_main_t vm,
crypto_worker_main_t cwm,
u32  node_index,
u32  error,
u8  numa,
u8  encrypt 
)

Definition at line 313 of file ipsec.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypto_free_ops()

static_always_inline void crypto_free_ops ( u8  numa,
struct rte_crypto_op **  ops,
u32  n 
)

Definition at line 301 of file ipsec.h.

+ Here is the caller graph for this function:

◆ crypto_get_session()

static_always_inline clib_error_t* crypto_get_session ( struct rte_cryptodev_sym_session **  session,
u32  sa_idx,
crypto_resource_t res,
crypto_worker_main_t cwm,
u8  is_outbound 
)

Definition at line 239 of file ipsec.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypto_op_get_priv()

static_always_inline dpdk_op_priv_t* crypto_op_get_priv ( struct rte_crypto_op *  op)

Definition at line 209 of file ipsec.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypto_op_get_priv_offset()

static_always_inline u32 crypto_op_get_priv_offset ( void  )

Definition at line 197 of file ipsec.h.

+ Here is the caller graph for this function:

◆ crypto_op_len()

static_always_inline u32 crypto_op_len ( void  )

Definition at line 187 of file ipsec.h.

+ Here is the caller graph for this function:

◆ crypto_op_setup()

static_always_inline void crypto_op_setup ( u8  is_aead,
struct rte_mbuf *  mb0,
struct rte_crypto_op *  op,
void *  session,
u32  cipher_off,
u32  cipher_len,
u32  auth_off,
u32  auth_len,
u8 aad,
u8 digest,
u64  digest_paddr 
)

Definition at line 358 of file ipsec.h.

+ Here is the caller graph for this function:

◆ crypto_set_icb()

static_always_inline void crypto_set_icb ( dpdk_gcm_cnt_blk icb,
u32  salt,
u32  seq,
u32  seq_hi 
)

Definition at line 350 of file ipsec.h.

+ Here is the caller graph for this function:

◆ get_resource()

static_always_inline u16 get_resource ( crypto_worker_main_t cwm,
ipsec_sa_t sa 
)

Definition at line 260 of file ipsec.h.

+ Here is the caller graph for this function:

◆ get_session_by_drv_and_sa_idx()

static_always_inline struct rte_cryptodev_sym_session* get_session_by_drv_and_sa_idx ( crypto_data_t data,
u32  drv_id,
u32  sa_idx 
)

Definition at line 228 of file ipsec.h.

+ Here is the caller graph for this function:

Variable Documentation

◆ dpdk_crypto_main

dpdk_crypto_main_t dpdk_crypto_main

Definition at line 26 of file ipsec.c.

◆ pad_data

const u8 pad_data[]
static
Initial value:
=
{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0 }

Definition at line 177 of file ipsec.h.

DROP
DROP
Definition: error.def:41