FD.io VPP  v19.08.2-294-g37e99c22d
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

◆ AES_GCM_ALG

#define AES_GCM_ALG   RTE_CRYPTO_AEAD_AES_GCM

◆ AES_GCM_TYPE

#define AES_GCM_TYPE   RTE_CRYPTO_SYM_XFORM_AEAD

◆ EMPTY_STRUCT

#define EMPTY_STRUCT   {0}

Definition at line 27 of file ipsec.c.

◆ NUM_CRYPTO_MBUFS

#define NUM_CRYPTO_MBUFS   16384

Definition at line 28 of file ipsec.c.

Function Documentation

◆ add_del_sa_session()

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:

◆ algos_init()

static void algos_init ( u32  n_mains)
static

Definition at line 31 of file ipsec.c.

+ Here is the caller graph for this function:

◆ auth_alg_index()

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:

◆ auth_cap_to_alg()

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:

◆ cipher_alg_index()

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:

◆ cipher_cap_to_alg()

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:

◆ clear_and_free_obj()

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:

◆ 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_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_create_crypto_op_pool()

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

Definition at line 818 of file ipsec.c.

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

◆ crypto_create_pools()

static clib_error_t* crypto_create_pools ( vlib_main_t vm)
static

Definition at line 935 of file ipsec.c.

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

◆ crypto_create_session_drv_pool()

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

Definition at line 897 of file ipsec.c.

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

◆ crypto_create_session_h_pool()

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

Definition at line 859 of file ipsec.c.

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

◆ crypto_dev_conf()

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

Definition at line 624 of file ipsec.c.

+ Here is the caller graph for this function:

◆ crypto_disable()

static void crypto_disable ( void  )
static

Definition at line 964 of file ipsec.c.

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

◆ crypto_op_init()

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

Definition at line 804 of file ipsec.c.

+ Here is the caller graph for this function:

◆ crypto_parse_capabilities()

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

Definition at line 573 of file ipsec.c.

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

◆ crypto_scan_devs()

static void crypto_scan_devs ( u32  n_mains)
static

Definition at line 661 of file ipsec.c.

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

◆ crypto_set_aead_xform()

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:

◆ crypto_set_auth_xform()

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:

◆ crypto_set_cipher_xform()

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:

◆ dpdk_crypto_session_disposal()

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:

◆ dpdk_ipsec_check_support()

static clib_error_t* dpdk_ipsec_check_support ( ipsec_sa_t sa)
static

Definition at line 540 of file ipsec.c.

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

◆ dpdk_ipsec_process()

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

Definition at line 995 of file ipsec.c.

+ Here is the call graph for this function:

◆ get_session_private_data()

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:

◆ set_session_private_data()

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

dpdk_crypto_main_t dpdk_crypto_main

Definition at line 25 of file ipsec.c.

◆ dpdk_ipsec_process_node

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:995

(constructor) VLIB_REGISTER_NODE (dpdk_ipsec_process_node)

Definition at line 1068 of file ipsec.c.