FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
ipsec.c File Reference
+ Include dependency graph for ipsec.c:

Go to the source code of this file.

Macros

#define EMPTY_STRUCT   {0}
 
#define AES_GCM_TYPE   RTE_CRYPTO_SYM_XFORM_AEAD
 
#define AES_GCM_ALG   RTE_CRYPTO_AEAD_AES_GCM
 
#define DPDK_CRYPTO_N_QUEUE_DESC   2048
 
#define DPDK_CRYPTO_NB_SESS_OBJS   20000
 

Functions

static void algos_init (u32 n_mains)
 
static u8 cipher_alg_index (const crypto_alg_t *alg)
 
static u8 auth_alg_index (const crypto_alg_t *alg)
 
static crypto_alg_tcipher_cap_to_alg (const struct rte_cryptodev_capabilities *cap, u8 key_len)
 
static crypto_alg_tauth_cap_to_alg (const struct rte_cryptodev_capabilities *cap, u8 trunc_size)
 
static void crypto_set_aead_xform (struct rte_crypto_sym_xform *xform, ipsec_sa_t *sa, u8 is_outbound)
 
static void crypto_set_cipher_xform (struct rte_crypto_sym_xform *xform, ipsec_sa_t *sa, u8 is_outbound)
 
static void crypto_set_auth_xform (struct rte_crypto_sym_xform *xform, ipsec_sa_t *sa, u8 is_outbound)
 
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 void clear_and_free_obj (void *obj)
 
static void * get_session_private_data (const struct rte_cryptodev_sym_session *sess, uint8_t driver_id)
 
static void set_session_private_data (struct rte_cryptodev_sym_session *sess, uint8_t driver_id, void *private_data)
 
static clib_error_tdpdk_crypto_session_disposal (crypto_session_disposal_t *v, u64 ts)
 
static clib_error_tadd_del_sa_session (u32 sa_index, u8 is_add)
 
static clib_error_tdpdk_ipsec_check_support (ipsec_sa_t *sa)
 
static void crypto_parse_capabilities (crypto_dev_t *dev, const struct rte_cryptodev_capabilities *cap, u32 n_mains)
 
static clib_error_tcrypto_dev_conf (u8 dev, u16 n_qp, u8 numa)
 
static void crypto_scan_devs (u32 n_mains)
 
void crypto_auto_placement (void)
 
static void crypto_op_init (struct rte_mempool *mempool, void *_arg, void *_obj, unsigned i)
 
static clib_error_tcrypto_create_crypto_op_pool (vlib_main_t *vm, u8 numa)
 
static clib_error_tcrypto_create_session_h_pool (vlib_main_t *vm, u8 numa)
 
static clib_error_tcrypto_create_session_drv_pool (vlib_main_t *vm, crypto_dev_t *dev)
 
static clib_error_tcrypto_create_pools (vlib_main_t *vm)
 
static void crypto_disable (void)
 
static uword dpdk_ipsec_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 

Variables

dpdk_crypto_main_t dpdk_crypto_main
 
static vlib_node_registration_t dpdk_ipsec_process_node
 (constructor) VLIB_REGISTER_NODE (dpdk_ipsec_process_node) More...
 

Macro Definition Documentation

#define AES_GCM_ALG   RTE_CRYPTO_AEAD_AES_GCM
#define AES_GCM_TYPE   RTE_CRYPTO_SYM_XFORM_AEAD
#define DPDK_CRYPTO_N_QUEUE_DESC   2048

Definition at line 626 of file ipsec.c.

#define DPDK_CRYPTO_NB_SESS_OBJS   20000

Definition at line 627 of file ipsec.c.

#define EMPTY_STRUCT   {0}

Definition at line 26 of file ipsec.c.

Function Documentation

static clib_error_t* add_del_sa_session ( u32  sa_index,
u8  is_add 
)
static

Definition at line 480 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void algos_init ( u32  n_mains)
static

Definition at line 29 of file ipsec.c.

+ Here is the caller graph for this function:

static u8 auth_alg_index ( const crypto_alg_t alg)
static

Definition at line 183 of file ipsec.c.

+ Here is the caller graph for this function:

static crypto_alg_t* auth_cap_to_alg ( const struct rte_cryptodev_capabilities *  cap,
u8  trunc_size 
)
static

Definition at line 219 of file ipsec.c.

+ Here is the caller graph for this function:

static u8 cipher_alg_index ( const crypto_alg_t alg)
static

Definition at line 175 of file ipsec.c.

+ Here is the caller graph for this function:

static crypto_alg_t* cipher_cap_to_alg ( const struct rte_cryptodev_capabilities *  cap,
u8  key_len 
)
static

Definition at line 191 of file ipsec.c.

+ Here is the caller graph for this function:

static void clear_and_free_obj ( void *  obj)
static

Definition at line 406 of file ipsec.c.

+ Here is the caller graph for this function:

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 319 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void crypto_auto_placement ( void  )

Definition at line 732 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* crypto_create_crypto_op_pool ( vlib_main_t vm,
u8  numa 
)
static

Definition at line 820 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* crypto_create_pools ( vlib_main_t vm)
static

Definition at line 947 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* crypto_create_session_drv_pool ( vlib_main_t vm,
crypto_dev_t dev 
)
static

Definition at line 902 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* crypto_create_session_h_pool ( vlib_main_t vm,
u8  numa 
)
static

Definition at line 863 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* crypto_dev_conf ( u8  dev,
u16  n_qp,
u8  numa 
)
static

Definition at line 630 of file ipsec.c.

+ Here is the caller graph for this function:

static void crypto_disable ( void  )
static

Definition at line 976 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void crypto_op_init ( struct rte_mempool *  mempool,
void *  _arg,
void *  _obj,
unsigned  i 
)
static

Definition at line 806 of file ipsec.c.

+ Here is the caller graph for this function:

static void crypto_parse_capabilities ( crypto_dev_t dev,
const struct rte_cryptodev_capabilities *  cap,
u32  n_mains 
)
static

Definition at line 576 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void crypto_scan_devs ( u32  n_mains)
static

Definition at line 663 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void crypto_set_aead_xform ( struct rte_crypto_sym_xform *  xform,
ipsec_sa_t sa,
u8  is_outbound 
)
static

Definition at line 241 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void crypto_set_auth_xform ( struct rte_crypto_sym_xform *  xform,
ipsec_sa_t sa,
u8  is_outbound 
)
static

Definition at line 295 of file ipsec.c.

+ Here is the caller graph for this function:

static void crypto_set_cipher_xform ( struct rte_crypto_sym_xform *  xform,
ipsec_sa_t sa,
u8  is_outbound 
)
static

Definition at line 269 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* dpdk_crypto_session_disposal ( crypto_session_disposal_t v,
u64  ts 
)
static

Definition at line 432 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* dpdk_ipsec_check_support ( ipsec_sa_t sa)
static

Definition at line 543 of file ipsec.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword dpdk_ipsec_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 1007 of file ipsec.c.

+ Here is the call graph for this function:

static void* get_session_private_data ( const struct rte_cryptodev_sym_session *  sess,
uint8_t  driver_id 
)
inlinestatic

Definition at line 417 of file ipsec.c.

+ Here is the caller graph for this function:

static void set_session_private_data ( struct rte_cryptodev_sym_session *  sess,
uint8_t  driver_id,
void *  private_data 
)
inlinestatic

Definition at line 425 of file ipsec.c.

+ Here is the caller graph for this function:

Variable Documentation

dpdk_crypto_main_t dpdk_crypto_main

Definition at line 24 of file ipsec.c.

vlib_node_registration_t dpdk_ipsec_process_node
static
Initial value:
= {
.function = dpdk_ipsec_process,
.name = "dpdk-ipsec-process",
.process_log2_n_stack_bytes = 17,
}
static uword dpdk_ipsec_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: ipsec.c:1007

(constructor) VLIB_REGISTER_NODE (dpdk_ipsec_process_node)

Definition at line 1089 of file ipsec.c.