FD.io VPP  v19.04.1-1-ge4a0f9f
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 NUM_CRYPTO_MBUFS   16384
 
#define AES_GCM_TYPE   RTE_CRYPTO_SYM_XFORM_AEAD
 
#define AES_GCM_ALG   RTE_CRYPTO_AEAD_AES_GCM
 

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 EMPTY_STRUCT   {0}

Definition at line 27 of file ipsec.c.

#define NUM_CRYPTO_MBUFS   16384

Definition at line 28 of file ipsec.c.

Function Documentation

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

Definition at line 495 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 31 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 185 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 221 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 177 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 193 of file ipsec.c.

+ Here is the caller graph for this function:

static void clear_and_free_obj ( void *  obj)
static

Definition at line 408 of file ipsec.c.

+ Here is the call graph for this function:

+ 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 321 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 749 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 837 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 954 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 916 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 878 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 643 of file ipsec.c.

+ Here is the caller graph for this function:

static void crypto_disable ( void  )
static

Definition at line 983 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 823 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 592 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 680 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 243 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 297 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 271 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 447 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 559 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 1014 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 419 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 434 of file ipsec.c.

+ Here is the caller graph for this function:

Variable Documentation

dpdk_crypto_main_t dpdk_crypto_main

Definition at line 25 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:1014

(constructor) VLIB_REGISTER_NODE (dpdk_ipsec_process_node)

Definition at line 1087 of file ipsec.c.