FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
crypto.c File Reference
+ Include dependency graph for crypto.c:

Go to the source code of this file.

Functions

static_always_inline void crypto_set_op_status (vnet_crypto_op_t *ops[], u32 n_ops, int status)
 
static_always_inline u32 vnet_crypto_process_ops_call_handler (vlib_main_t *vm, vnet_crypto_main_t *cm, vnet_crypto_op_id_t opt, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops)
 
static_always_inline u32 vnet_crypto_process_ops_inline (vlib_main_t *vm, vnet_crypto_op_t ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops)
 
u32 vnet_crypto_process_ops (vlib_main_t *vm, vnet_crypto_op_t ops[], u32 n_ops)
 
u32 vnet_crypto_process_chained_ops (vlib_main_t *vm, vnet_crypto_op_t ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops)
 
u32 vnet_crypto_register_engine (vlib_main_t *vm, char *name, int prio, char *desc)
 
static_always_inline void crypto_set_active_engine (vnet_crypto_op_data_t *od, vnet_crypto_op_id_t id, u32 ei, crypto_op_class_type_t oct)
 
int vnet_crypto_set_handler2 (char *alg_name, char *engine, crypto_op_class_type_t oct)
 
int vnet_crypto_is_set_handler (vnet_crypto_alg_t alg)
 
void vnet_crypto_register_ops_handler_inline (vlib_main_t *vm, u32 engine_index, vnet_crypto_op_id_t opt, vnet_crypto_ops_handler_t *fn, vnet_crypto_chained_ops_handler_t *cfn)
 
void vnet_crypto_register_ops_handler (vlib_main_t *vm, u32 engine_index, vnet_crypto_op_id_t opt, vnet_crypto_ops_handler_t *fn)
 
void vnet_crypto_register_chained_ops_handler (vlib_main_t *vm, u32 engine_index, vnet_crypto_op_id_t opt, vnet_crypto_chained_ops_handler_t *fn)
 
void vnet_crypto_register_ops_handlers (vlib_main_t *vm, u32 engine_index, vnet_crypto_op_id_t opt, vnet_crypto_ops_handler_t *fn, vnet_crypto_chained_ops_handler_t *cfn)
 
void vnet_crypto_register_async_handler (vlib_main_t *vm, u32 engine_index, vnet_crypto_async_op_id_t opt, vnet_crypto_frame_enqueue_t *enqueue_hdl, vnet_crypto_frame_dequeue_t *dequeue_hdl)
 
void vnet_crypto_register_key_handler (vlib_main_t *vm, u32 engine_index, vnet_crypto_key_handler_t *key_handler)
 
static int vnet_crypto_key_len_check (vnet_crypto_alg_t alg, u16 length)
 
u32 vnet_crypto_key_add (vlib_main_t *vm, vnet_crypto_alg_t alg, u8 *data, u16 length)
 
void vnet_crypto_key_del (vlib_main_t *vm, vnet_crypto_key_index_t index)
 
vnet_crypto_async_alg_t vnet_crypto_link_algs (vnet_crypto_alg_t crypto_alg, vnet_crypto_alg_t integ_alg)
 
u32 vnet_crypto_key_add_linked (vlib_main_t *vm, vnet_crypto_key_index_t index_crypto, vnet_crypto_key_index_t index_integ)
 Use 2 created keys to generate new key for linked algs (cipher + integ) The returned key index is to be used for linked alg only. More...
 
clib_error_tcrypto_dispatch_enable_disable (int is_enable)
 
static_always_inline void crypto_set_active_async_engine (vnet_crypto_async_op_data_t *od, vnet_crypto_async_op_id_t id, u32 ei)
 
int vnet_crypto_set_async_handler2 (char *alg_name, char *engine)
 
u32 vnet_crypto_register_post_node (vlib_main_t *vm, char *post_node_name)
 async crypto register functions More...
 
void vnet_crypto_request_async_mode (int is_enable)
 
void vnet_crypto_set_async_dispatch_mode (u8 mode)
 
int vnet_crypto_is_set_async_handler (vnet_crypto_async_op_id_t op)
 
static void vnet_crypto_init_cipher_data (vnet_crypto_alg_t alg, vnet_crypto_op_id_t eid, vnet_crypto_op_id_t did, char *name, u8 is_aead)
 
static void vnet_crypto_init_hash_data (vnet_crypto_alg_t alg, vnet_crypto_op_id_t id, char *name)
 
static void vnet_crypto_init_hmac_data (vnet_crypto_alg_t alg, vnet_crypto_op_id_t id, char *name)
 
static void vnet_crypto_init_async_data (vnet_crypto_async_alg_t alg, vnet_crypto_async_op_id_t eid, vnet_crypto_async_op_id_t did, char *name)
 
clib_error_tvnet_crypto_init (vlib_main_t *vm)
 

Variables

vnet_crypto_main_t crypto_main
 

Function Documentation

◆ crypto_dispatch_enable_disable()

clib_error_t * crypto_dispatch_enable_disable ( int  is_enable)

Definition at line 459 of file crypto.c.

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

◆ crypto_set_active_async_engine()

static_always_inline void crypto_set_active_async_engine ( vnet_crypto_async_op_data_t od,
vnet_crypto_async_op_id_t  id,
u32  ei 
)

Definition at line 494 of file crypto.c.

+ Here is the caller graph for this function:

◆ crypto_set_active_engine()

static_always_inline void crypto_set_active_engine ( vnet_crypto_op_data_t od,
vnet_crypto_op_id_t  id,
u32  ei,
crypto_op_class_type_t  oct 
)

Definition at line 129 of file crypto.c.

+ Here is the caller graph for this function:

◆ crypto_set_op_status()

static_always_inline void crypto_set_op_status ( vnet_crypto_op_t ops[],
u32  n_ops,
int  status 
)

Definition at line 23 of file crypto.c.

+ Here is the caller graph for this function:

◆ vnet_crypto_init()

clib_error_t* vnet_crypto_init ( vlib_main_t vm)

Definition at line 727 of file crypto.c.

+ Here is the call graph for this function:

◆ vnet_crypto_init_async_data()

static void vnet_crypto_init_async_data ( vnet_crypto_async_alg_t  alg,
vnet_crypto_async_op_id_t  eid,
vnet_crypto_async_op_id_t  did,
char *  name 
)
static

Definition at line 706 of file crypto.c.

◆ vnet_crypto_init_cipher_data()

static void vnet_crypto_init_cipher_data ( vnet_crypto_alg_t  alg,
vnet_crypto_op_id_t  eid,
vnet_crypto_op_id_t  did,
char *  name,
u8  is_aead 
)
static

Definition at line 648 of file crypto.c.

◆ vnet_crypto_init_hash_data()

static void vnet_crypto_init_hash_data ( vnet_crypto_alg_t  alg,
vnet_crypto_op_id_t  id,
char *  name 
)
static

Definition at line 678 of file crypto.c.

◆ vnet_crypto_init_hmac_data()

static void vnet_crypto_init_hmac_data ( vnet_crypto_alg_t  alg,
vnet_crypto_op_id_t  id,
char *  name 
)
static

Definition at line 692 of file crypto.c.

◆ vnet_crypto_is_set_async_handler()

int vnet_crypto_is_set_async_handler ( vnet_crypto_async_op_id_t  op)

Definition at line 639 of file crypto.c.

◆ vnet_crypto_is_set_handler()

int vnet_crypto_is_set_handler ( vnet_crypto_alg_t  alg)

Definition at line 189 of file crypto.c.

+ Here is the caller graph for this function:

◆ vnet_crypto_key_add()

u32 vnet_crypto_key_add ( vlib_main_t vm,
vnet_crypto_alg_t  alg,
u8 data,
u16  length 
)

Definition at line 360 of file crypto.c.

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

◆ vnet_crypto_key_add_linked()

u32 vnet_crypto_key_add_linked ( vlib_main_t vm,
vnet_crypto_key_index_t  index_crypto,
vnet_crypto_key_index_t  index_integ 
)

Use 2 created keys to generate new key for linked algs (cipher + integ) The returned key index is to be used for linked alg only.

Definition at line 425 of file crypto.c.

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

◆ vnet_crypto_key_del()

void vnet_crypto_key_del ( vlib_main_t vm,
vnet_crypto_key_index_t  index 
)

Definition at line 386 of file crypto.c.

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

◆ vnet_crypto_key_len_check()

static int vnet_crypto_key_len_check ( vnet_crypto_alg_t  alg,
u16  length 
)
static

Definition at line 326 of file crypto.c.

+ Here is the caller graph for this function:

◆ vnet_crypto_link_algs()

vnet_crypto_async_alg_t vnet_crypto_link_algs ( vnet_crypto_alg_t  crypto_alg,
vnet_crypto_alg_t  integ_alg 
)

Definition at line 412 of file crypto.c.

+ Here is the caller graph for this function:

◆ vnet_crypto_process_chained_ops()

u32 vnet_crypto_process_chained_ops ( vlib_main_t vm,
vnet_crypto_op_t  ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops 
)

Definition at line 105 of file crypto.c.

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

◆ vnet_crypto_process_ops()

u32 vnet_crypto_process_ops ( vlib_main_t vm,
vnet_crypto_op_t  ops[],
u32  n_ops 
)

Definition at line 99 of file crypto.c.

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

◆ vnet_crypto_process_ops_call_handler()

static_always_inline u32 vnet_crypto_process_ops_call_handler ( vlib_main_t vm,
vnet_crypto_main_t cm,
vnet_crypto_op_id_t  opt,
vnet_crypto_op_t ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops 
)

Definition at line 33 of file crypto.c.

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

◆ vnet_crypto_process_ops_inline()

static_always_inline u32 vnet_crypto_process_ops_inline ( vlib_main_t vm,
vnet_crypto_op_t  ops[],
vnet_crypto_op_chunk_t chunks,
u32  n_ops 
)

Definition at line 65 of file crypto.c.

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

◆ vnet_crypto_register_async_handler()

void vnet_crypto_register_async_handler ( vlib_main_t vm,
u32  engine_index,
vnet_crypto_async_op_id_t  opt,
vnet_crypto_frame_enqueue_t enqueue_hdl,
vnet_crypto_frame_dequeue_t dequeue_hdl 
)

Definition at line 278 of file crypto.c.

◆ vnet_crypto_register_chained_ops_handler()

void vnet_crypto_register_chained_ops_handler ( vlib_main_t vm,
u32  engine_index,
vnet_crypto_op_id_t  opt,
vnet_crypto_chained_ops_handler_t fn 
)

Definition at line 260 of file crypto.c.

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

◆ vnet_crypto_register_engine()

u32 vnet_crypto_register_engine ( vlib_main_t vm,
char *  name,
int  prio,
char *  desc 
)

Definition at line 112 of file crypto.c.

+ Here is the caller graph for this function:

◆ vnet_crypto_register_key_handler()

void vnet_crypto_register_key_handler ( vlib_main_t vm,
u32  engine_index,
vnet_crypto_key_handler_t key_handler 
)

Definition at line 316 of file crypto.c.

+ Here is the caller graph for this function:

◆ vnet_crypto_register_ops_handler()

void vnet_crypto_register_ops_handler ( vlib_main_t vm,
u32  engine_index,
vnet_crypto_op_id_t  opt,
vnet_crypto_ops_handler_t fn 
)

Definition at line 252 of file crypto.c.

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

◆ vnet_crypto_register_ops_handler_inline()

void vnet_crypto_register_ops_handler_inline ( vlib_main_t vm,
u32  engine_index,
vnet_crypto_op_id_t  opt,
vnet_crypto_ops_handler_t fn,
vnet_crypto_chained_ops_handler_t cfn 
)

Definition at line 206 of file crypto.c.

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

◆ vnet_crypto_register_ops_handlers()

void vnet_crypto_register_ops_handlers ( vlib_main_t vm,
u32  engine_index,
vnet_crypto_op_id_t  opt,
vnet_crypto_ops_handler_t fn,
vnet_crypto_chained_ops_handler_t cfn 
)

Definition at line 269 of file crypto.c.

+ Here is the call graph for this function:

◆ vnet_crypto_register_post_node()

u32 vnet_crypto_register_post_node ( vlib_main_t vm,
char *  post_node_name 
)

async crypto register functions

Definition at line 541 of file crypto.c.

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

◆ vnet_crypto_request_async_mode()

void vnet_crypto_request_async_mode ( int  is_enable)

Definition at line 571 of file crypto.c.

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

◆ vnet_crypto_set_async_dispatch_mode()

void vnet_crypto_set_async_dispatch_mode ( u8  mode)

Definition at line 608 of file crypto.c.

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

◆ vnet_crypto_set_async_handler2()

int vnet_crypto_set_async_handler2 ( char *  alg_name,
char *  engine 
)

Definition at line 509 of file crypto.c.

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

◆ vnet_crypto_set_handler2()

int vnet_crypto_set_handler2 ( char *  alg_name,
char *  engine,
crypto_op_class_type_t  oct 
)

Definition at line 156 of file crypto.c.

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

Variable Documentation

◆ crypto_main

vnet_crypto_main_t crypto_main

Definition at line 20 of file crypto.c.