FD.io VPP  v20.01-9-g24064d02a
Vector Packet Processing
ipsec.h File Reference
+ Include dependency graph for ipsec.h:
+ This graph shows which files directly or indirectly include this file:

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 28 of file ipsec.h.

◆ DPDK_CRYPTO_N_QUEUE_DESC

#define DPDK_CRYPTO_N_QUEUE_DESC   2048

Definition at line 33 of file ipsec.h.

◆ DPDK_CRYPTO_NB_SESS_OBJS

#define DPDK_CRYPTO_NB_SESS_OBJS   20000

Definition at line 34 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")
DROP
Definition: error.def:41

Definition at line 36 of file ipsec.h.

◆ MAX_QP_PER_LCORE

#define MAX_QP_PER_LCORE   16

Definition at line 53 of file ipsec.h.

Enumeration Type Documentation

◆ dpdk_crypto_input_next_t

Enumerator
DPDK_CRYPTO_INPUT_N_NEXT 

Definition at line 45 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 215 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 321 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 284 of file ipsec.h.

+ Here is the caller graph for this function:

◆ crypto_auto_placement()

void crypto_auto_placement ( void  )

Definition at line 730 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 312 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 300 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 238 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 208 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 196 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 186 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 357 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 349 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 259 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 227 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 25 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 176 of file ipsec.h.