FD.io VPP  v21.06-3-gbb25fbf28
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 clib_error_tdpdk_ipsec_enable_disable (int is_enable)
 
static clib_error_tdpdk_ipsec_main_init (vlib_main_t *vm)
 

Variables

dpdk_crypto_main_t dpdk_crypto_main
 

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

◆ NUM_CRYPTO_MBUFS

#define NUM_CRYPTO_MBUFS   16384

Definition at line 29 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 494 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 32 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 186 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 222 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 178 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 194 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 407 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 322 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 729 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 817 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 934 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 896 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 858 of file ipsec.c.

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

+ Here is the caller graph for this function:

◆ crypto_disable()

static void crypto_disable ( void  )
static

Definition at line 963 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 803 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 572 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 660 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 244 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 298 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 272 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 446 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 539 of file ipsec.c.

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

◆ dpdk_ipsec_enable_disable()

static clib_error_t* dpdk_ipsec_enable_disable ( int  is_enable)
static

Definition at line 994 of file ipsec.c.

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

◆ dpdk_ipsec_main_init()

static clib_error_t* dpdk_ipsec_main_init ( vlib_main_t vm)
static

Definition at line 1012 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 418 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 433 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 26 of file ipsec.c.