FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
crypto.h File Reference
+ Include dependency graph for crypto.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_crypto_key_t
 
struct  vnet_crypto_alg_data_t
 
struct  vnet_crypto_op_chunk_t
 
struct  vnet_crypto_op_t
 
struct  vnet_crypto_op_data_t
 
struct  vnet_crypto_async_op_data_t
 
struct  vnet_crypto_async_alg_data_t
 
struct  vnet_crypto_async_frame_elt_t
 
struct  vnet_crypto_async_frame_t
 
struct  vnet_crypto_thread_t
 
struct  vnet_crypto_engine_t
 
struct  vnet_crypto_async_next_node_t
 
struct  vnet_crypto_main_t
 

Macros

#define VNET_CRYPTO_FRAME_SIZE   64
 
#define VNET_CRYPTO_FRAME_POOL_SIZE   1024
 
#define foreach_crypto_cipher_alg
 
#define foreach_crypto_aead_alg
 
#define foreach_crypto_hash_alg
 
#define foreach_crypto_hmac_alg
 
#define foreach_crypto_op_type
 
#define foreach_crypto_op_status
 
#define foreach_crypto_aead_async_alg
 async crypto More...
 
#define foreach_crypto_link_async_alg
 
#define foreach_crypto_async_op_type
 
#define VNET_CRYPTO_KEY_TYPE_DATA   0
 
#define VNET_CRYPTO_KEY_TYPE_LINK   1
 
#define VNET_CRYPTO_OP_FLAG_INIT_IV   (1 << 0)
 
#define VNET_CRYPTO_OP_FLAG_HMAC_CHECK   (1 << 1)
 
#define VNET_CRYPTO_OP_FLAG_CHAINED_BUFFERS   (1 << 2)
 
#define VNET_CRYPTO_ASYNC_DISPATCH_POLLING   0
 
#define VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT   1
 

Typedefs

typedef enum vnet_crypto_async_frame_state_t_ vnet_crypto_async_frame_state_t
 
typedef u32 vnet_crypto_key_index_t
 
typedef u32() vnet_crypto_chained_ops_handler_t(vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops)
 
typedef u32() vnet_crypto_ops_handler_t(vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops)
 
typedef void() vnet_crypto_key_handler_t(vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx)
 
typedef int() vnet_crypto_frame_enqueue_t(vlib_main_t *vm, vnet_crypto_async_frame_t *frame)
 async crypto function handlers More...
 
typedef vnet_crypto_async_frame_t *() vnet_crypto_frame_dequeue_t(vlib_main_t *vm, u32 *nb_elts_processed, u32 *enqueue_thread_idx)
 

Enumerations

enum  vnet_crypto_op_type_t { VNET_CRYPTO_OP_N_TYPES }
 
enum  vnet_crypto_key_op_t { VNET_CRYPTO_KEY_OP_ADD, VNET_CRYPTO_KEY_OP_DEL, VNET_CRYPTO_KEY_OP_MODIFY }
 
enum  vnet_crypto_op_status_t { VNET_CRYPTO_OP_N_STATUS }
 
enum  vnet_crypto_alg_t { VNET_CRYPTO_ALG_NONE = 0, VNET_CRYPTO_N_ALGS }
 
enum  vnet_crypto_async_op_type_t { VNET_CRYPTO_ASYNC_OP_N_TYPES }
 
enum  vnet_crypto_async_alg_t { VNET_CRYPTO_ASYNC_ALG_NONE = 0, VNET_CRYPTO_N_ASYNC_ALGS }
 
enum  vnet_crypto_async_op_id_t { VNET_CRYPTO_ASYNC_OP_NONE = 0, VNET_CRYPTO_ASYNC_OP_N_IDS }
 
enum  vnet_crypto_op_id_t { VNET_CRYPTO_OP_NONE = 0, VNET_CRYPTO_N_OP_IDS }
 
enum  crypto_op_class_type_t { CRYPTO_OP_SIMPLE, CRYPTO_OP_CHAINED, CRYPTO_OP_BOTH }
 
enum  vnet_crypto_async_frame_state_t_ {
  VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED, VNET_CRYPTO_FRAME_STATE_PENDING, VNET_CRYPTO_FRAME_STATE_WORK_IN_PROGRESS, VNET_CRYPTO_FRAME_STATE_SUCCESS,
  VNET_CRYPTO_FRAME_STATE_ELT_ERROR
}
 

Functions

 STATIC_ASSERT_SIZEOF (vnet_crypto_op_t, CLIB_CACHE_LINE_BYTES)
 
 STATIC_ASSERT_SIZEOF (vnet_crypto_async_frame_elt_t, 5 *sizeof(u64))
 
u32 vnet_crypto_register_engine (vlib_main_t *vm, char *name, int prio, char *desc)
 
void vnet_crypto_register_ops_handler (vlib_main_t *vm, u32 engine_index, vnet_crypto_op_id_t opt, vnet_crypto_ops_handler_t *oph)
 
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 *oph)
 
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_key_handler (vlib_main_t *vm, u32 engine_index, vnet_crypto_key_handler_t *keyh)
 
u32 vnet_crypto_register_post_node (vlib_main_t *vm, char *post_node_name)
 async crypto register functions More...
 
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 *enq_fn, vnet_crypto_frame_dequeue_t *deq_fn)
 
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_process_ops (vlib_main_t *vm, vnet_crypto_op_t ops[], u32 n_ops)
 
int vnet_crypto_set_handler2 (char *ops_handler_name, char *engine, crypto_op_class_type_t oct)
 
int vnet_crypto_is_set_handler (vnet_crypto_alg_t alg)
 
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)
 
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)
 
int vnet_crypto_set_async_handler2 (char *alg_name, char *engine)
 
int vnet_crypto_is_set_async_handler (vnet_crypto_async_op_id_t opt)
 
void vnet_crypto_request_async_mode (int is_enable)
 
void vnet_crypto_set_async_dispatch_mode (u8 mode)
 
vnet_crypto_async_alg_t vnet_crypto_link_algs (vnet_crypto_alg_t crypto_alg, vnet_crypto_alg_t integ_alg)
 
static_always_inline void vnet_crypto_op_init (vnet_crypto_op_t *op, vnet_crypto_op_id_t type)
 
static_always_inline vnet_crypto_op_type_t vnet_crypto_get_op_type (vnet_crypto_op_id_t id)
 
static_always_inline vnet_crypto_key_tvnet_crypto_get_key (vnet_crypto_key_index_t index)
 
static_always_inline int vnet_crypto_set_handler (char *alg_name, char *engine)
 
static_always_inline vnet_crypto_async_frame_tvnet_crypto_async_get_frame (vlib_main_t *vm, vnet_crypto_async_op_id_t opt)
 async crypto inline functions More...
 
static_always_inline void vnet_crypto_async_free_frame (vlib_main_t *vm, vnet_crypto_async_frame_t *frame)
 
static_always_inline int vnet_crypto_async_submit_open_frame (vlib_main_t *vm, vnet_crypto_async_frame_t *frame)
 
static_always_inline void vnet_crypto_async_add_to_frame (vlib_main_t *vm, vnet_crypto_async_frame_t *f, u32 key_index, u32 crypto_len, i16 integ_len_adj, i16 crypto_start_offset, u16 integ_start_offset, u32 buffer_index, u16 next_node, u8 *iv, u8 *tag, u8 *aad, u8 flags)
 
static_always_inline void vnet_crypto_async_reset_frame (vnet_crypto_async_frame_t *f)
 
static_always_inline u8 vnet_crypto_async_frame_is_full (const vnet_crypto_async_frame_t *f)
 

Variables

vnet_crypto_main_t crypto_main
 
format_function_t format_vnet_crypto_alg
 
format_function_t format_vnet_crypto_engine
 
format_function_t format_vnet_crypto_op
 
format_function_t format_vnet_crypto_op_type
 
format_function_t format_vnet_crypto_op_status
 
unformat_function_t unformat_vnet_crypto_alg
 
format_function_t format_vnet_crypto_async_op
 
format_function_t format_vnet_crypto_async_alg
 
format_function_t format_vnet_crypto_async_op_type
 

Macro Definition Documentation

◆ foreach_crypto_aead_alg

#define foreach_crypto_aead_alg
Value:
_(AES_128_GCM, "aes-128-gcm", 16) \
_(AES_192_GCM, "aes-192-gcm", 24) \
_(AES_256_GCM, "aes-256-gcm", 32) \
_(CHACHA20_POLY1305, "chacha20-poly1305", 32)

Definition at line 36 of file crypto.h.

◆ foreach_crypto_aead_async_alg

#define foreach_crypto_aead_async_alg
Value:
_(AES_128_GCM, "aes-128-gcm-aad8", 16, 16, 8) \
_(AES_128_GCM, "aes-128-gcm-aad12", 16, 16, 12) \
_(AES_192_GCM, "aes-192-gcm-aad8", 24, 16, 8) \
_(AES_192_GCM, "aes-192-gcm-aad12", 24, 16, 12) \
_(AES_256_GCM, "aes-256-gcm-aad8", 32, 16, 8) \
_(AES_256_GCM, "aes-256-gcm-aad12", 32, 16, 12) \
_(CHACHA20_POLY1305, "chacha20-poly1305-aad8", 32, 16, 8) \
_(CHACHA20_POLY1305, "chacha20-poly1305-aad12", 32, 16, 12)

async crypto

Definition at line 85 of file crypto.h.

◆ foreach_crypto_async_op_type

#define foreach_crypto_async_op_type
Value:
_(ENCRYPT, "async-encrypt") \
_(DECRYPT, "async-decrypt")

Definition at line 125 of file crypto.h.

◆ foreach_crypto_cipher_alg

#define foreach_crypto_cipher_alg
Value:
_(DES_CBC, "des-cbc", 7) \
_(3DES_CBC, "3des-cbc", 24) \
_(AES_128_CBC, "aes-128-cbc", 16) \
_(AES_192_CBC, "aes-192-cbc", 24) \
_(AES_256_CBC, "aes-256-cbc", 32) \
_(AES_128_CTR, "aes-128-ctr", 16) \
_(AES_192_CTR, "aes-192-ctr", 24) \
_(AES_256_CTR, "aes-256-ctr", 32)

Definition at line 25 of file crypto.h.

◆ foreach_crypto_hash_alg

#define foreach_crypto_hash_alg
Value:
_ (SHA1, "sha-1") \
_ (SHA224, "sha-224") \
_ (SHA256, "sha-256") \
_ (SHA384, "sha-384") \
_ (SHA512, "sha-512")

Definition at line 42 of file crypto.h.

◆ foreach_crypto_hmac_alg

#define foreach_crypto_hmac_alg
Value:
_(MD5, "md5") \
_(SHA1, "sha-1") \
_(SHA224, "sha-224") \
_(SHA256, "sha-256") \
_(SHA384, "sha-384") \
_(SHA512, "sha-512")

Definition at line 49 of file crypto.h.

◆ foreach_crypto_link_async_alg

#define foreach_crypto_link_async_alg
Value:
_ (3DES_CBC, MD5, "3des-cbc-hmac-md5", 24, 12) \
_ (AES_128_CBC, MD5, "aes-128-cbc-hmac-md5", 16, 12) \
_ (AES_192_CBC, MD5, "aes-192-cbc-hmac-md5", 24, 12) \
_ (AES_256_CBC, MD5, "aes-256-cbc-hmac-md5", 32, 12) \
_ (3DES_CBC, SHA1, "3des-cbc-hmac-sha-1", 24, 12) \
_ (AES_128_CBC, SHA1, "aes-128-cbc-hmac-sha-1", 16, 12) \
_ (AES_192_CBC, SHA1, "aes-192-cbc-hmac-sha-1", 24, 12) \
_ (AES_256_CBC, SHA1, "aes-256-cbc-hmac-sha-1", 32, 12) \
_ (3DES_CBC, SHA224, "3des-cbc-hmac-sha-224", 24, 14) \
_ (AES_128_CBC, SHA224, "aes-128-cbc-hmac-sha-224", 16, 14) \
_ (AES_192_CBC, SHA224, "aes-192-cbc-hmac-sha-224", 24, 14) \
_ (AES_256_CBC, SHA224, "aes-256-cbc-hmac-sha-224", 32, 14) \
_ (3DES_CBC, SHA256, "3des-cbc-hmac-sha-256", 24, 16) \
_ (AES_128_CBC, SHA256, "aes-128-cbc-hmac-sha-256", 16, 16) \
_ (AES_192_CBC, SHA256, "aes-192-cbc-hmac-sha-256", 24, 16) \
_ (AES_256_CBC, SHA256, "aes-256-cbc-hmac-sha-256", 32, 16) \
_ (3DES_CBC, SHA384, "3des-cbc-hmac-sha-384", 24, 24) \
_ (AES_128_CBC, SHA384, "aes-128-cbc-hmac-sha-384", 16, 24) \
_ (AES_192_CBC, SHA384, "aes-192-cbc-hmac-sha-384", 24, 24) \
_ (AES_256_CBC, SHA384, "aes-256-cbc-hmac-sha-384", 32, 24) \
_ (3DES_CBC, SHA512, "3des-cbc-hmac-sha-512", 24, 32) \
_ (AES_128_CBC, SHA512, "aes-128-cbc-hmac-sha-512", 16, 32) \
_ (AES_192_CBC, SHA512, "aes-192-cbc-hmac-sha-512", 24, 32) \
_ (AES_256_CBC, SHA512, "aes-256-cbc-hmac-sha-512", 32, 32) \
_ (AES_128_CTR, SHA1, "aes-128-ctr-hmac-sha-1", 16, 12) \
_ (AES_192_CTR, SHA1, "aes-192-ctr-hmac-sha-1", 24, 12) \
_ (AES_256_CTR, SHA1, "aes-256-ctr-hmac-sha-1", 32, 12)

Definition at line 96 of file crypto.h.

◆ foreach_crypto_op_status

#define foreach_crypto_op_status
Value:
_(IDLE, "idle") \
_(PENDING, "pending") \
_(WORK_IN_PROGRESS, "work-in-progress") \
_(COMPLETED, "completed") \
_(FAIL_NO_HANDLER, "no-handler") \
_(FAIL_BAD_HMAC, "bad-hmac") \
_(FAIL_ENGINE_ERR, "engine-error")

Definition at line 73 of file crypto.h.

◆ foreach_crypto_op_type

#define foreach_crypto_op_type
Value:
_ (ENCRYPT, "encrypt") \
_ (DECRYPT, "decrypt") \
_ (AEAD_ENCRYPT, "aead-encrypt") \
_ (AEAD_DECRYPT, "aead-decrypt") \
_ (HMAC, "hmac") \
_ (HASH, "hash")

Definition at line 57 of file crypto.h.

◆ VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT

#define VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT   1

Definition at line 472 of file crypto.h.

◆ VNET_CRYPTO_ASYNC_DISPATCH_POLLING

#define VNET_CRYPTO_ASYNC_DISPATCH_POLLING   0

Definition at line 471 of file crypto.h.

◆ VNET_CRYPTO_FRAME_POOL_SIZE

#define VNET_CRYPTO_FRAME_POOL_SIZE   1024

Definition at line 22 of file crypto.h.

◆ VNET_CRYPTO_FRAME_SIZE

#define VNET_CRYPTO_FRAME_SIZE   64

Definition at line 21 of file crypto.h.

◆ VNET_CRYPTO_KEY_TYPE_DATA

#define VNET_CRYPTO_KEY_TYPE_DATA   0

Definition at line 214 of file crypto.h.

◆ VNET_CRYPTO_KEY_TYPE_LINK

#define VNET_CRYPTO_KEY_TYPE_LINK   1

Definition at line 215 of file crypto.h.

◆ VNET_CRYPTO_OP_FLAG_CHAINED_BUFFERS

#define VNET_CRYPTO_OP_FLAG_CHAINED_BUFFERS   (1 << 2)

Definition at line 264 of file crypto.h.

◆ VNET_CRYPTO_OP_FLAG_HMAC_CHECK

#define VNET_CRYPTO_OP_FLAG_HMAC_CHECK   (1 << 1)

Definition at line 263 of file crypto.h.

◆ VNET_CRYPTO_OP_FLAG_INIT_IV

#define VNET_CRYPTO_OP_FLAG_INIT_IV   (1 << 0)

Definition at line 262 of file crypto.h.

Typedef Documentation

◆ vnet_crypto_async_frame_state_t

◆ vnet_crypto_chained_ops_handler_t

typedef u32() vnet_crypto_chained_ops_handler_t(vlib_main_t *vm, vnet_crypto_op_t *ops[], vnet_crypto_op_chunk_t *chunks, u32 n_ops)

Definition at line 380 of file crypto.h.

◆ vnet_crypto_frame_dequeue_t

typedef vnet_crypto_async_frame_t*() vnet_crypto_frame_dequeue_t(vlib_main_t *vm, u32 *nb_elts_processed, u32 *enqueue_thread_idx)

Definition at line 397 of file crypto.h.

◆ vnet_crypto_frame_enqueue_t

typedef int() vnet_crypto_frame_enqueue_t(vlib_main_t *vm, vnet_crypto_async_frame_t *frame)

async crypto function handlers

Definition at line 394 of file crypto.h.

◆ vnet_crypto_key_handler_t

typedef void() vnet_crypto_key_handler_t(vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx)

Definition at line 388 of file crypto.h.

◆ vnet_crypto_key_index_t

Definition at line 378 of file crypto.h.

◆ vnet_crypto_ops_handler_t

typedef u32() vnet_crypto_ops_handler_t(vlib_main_t *vm, vnet_crypto_op_t *ops[], u32 n_ops)

Definition at line 385 of file crypto.h.

Enumeration Type Documentation

◆ crypto_op_class_type_t

Enumerator
CRYPTO_OP_SIMPLE 
CRYPTO_OP_CHAINED 
CRYPTO_OP_BOTH 

Definition at line 235 of file crypto.h.

◆ vnet_crypto_alg_t

Enumerator
VNET_CRYPTO_ALG_NONE 
VNET_CRYPTO_N_ALGS 

Definition at line 145 of file crypto.h.

◆ vnet_crypto_async_alg_t

Enumerator
VNET_CRYPTO_ASYNC_ALG_NONE 
VNET_CRYPTO_N_ASYNC_ALGS 

Definition at line 168 of file crypto.h.

◆ vnet_crypto_async_frame_state_t_

Enumerator
VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED 
VNET_CRYPTO_FRAME_STATE_PENDING 
VNET_CRYPTO_FRAME_STATE_WORK_IN_PROGRESS 
VNET_CRYPTO_FRAME_STATE_SUCCESS 
VNET_CRYPTO_FRAME_STATE_ELT_ERROR 

Definition at line 348 of file crypto.h.

◆ vnet_crypto_async_op_id_t

Enumerator
VNET_CRYPTO_ASYNC_OP_NONE 
VNET_CRYPTO_ASYNC_OP_N_IDS 

Definition at line 182 of file crypto.h.

◆ vnet_crypto_async_op_type_t

Enumerator
VNET_CRYPTO_ASYNC_OP_N_TYPES 

Definition at line 160 of file crypto.h.

◆ vnet_crypto_key_op_t

Enumerator
VNET_CRYPTO_KEY_OP_ADD 
VNET_CRYPTO_KEY_OP_DEL 
VNET_CRYPTO_KEY_OP_MODIFY 

Definition at line 129 of file crypto.h.

◆ vnet_crypto_op_id_t

Enumerator
VNET_CRYPTO_OP_NONE 
VNET_CRYPTO_N_OP_IDS 

Definition at line 219 of file crypto.h.

◆ vnet_crypto_op_status_t

Enumerator
VNET_CRYPTO_OP_N_STATUS 

Definition at line 136 of file crypto.h.

◆ vnet_crypto_op_type_t

Enumerator
VNET_CRYPTO_OP_N_TYPES 

Definition at line 65 of file crypto.h.

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:

◆ STATIC_ASSERT_SIZEOF() [1/2]

STATIC_ASSERT_SIZEOF ( vnet_crypto_async_frame_elt_t  ,
5 *  sizeofu64 
)

◆ STATIC_ASSERT_SIZEOF() [2/2]

STATIC_ASSERT_SIZEOF ( vnet_crypto_op_t  ,
CLIB_CACHE_LINE_BYTES   
)

◆ vnet_crypto_async_add_to_frame()

static_always_inline void vnet_crypto_async_add_to_frame ( vlib_main_t vm,
vnet_crypto_async_frame_t f,
u32  key_index,
u32  crypto_len,
i16  integ_len_adj,
i16  crypto_start_offset,
u16  integ_start_offset,
u32  buffer_index,
u16  next_node,
u8 iv,
u8 tag,
u8 aad,
u8  flags 
)

Definition at line 621 of file crypto.h.

+ Here is the caller graph for this function:

◆ vnet_crypto_async_frame_is_full()

static_always_inline u8 vnet_crypto_async_frame_is_full ( const vnet_crypto_async_frame_t f)

Definition at line 665 of file crypto.h.

+ Here is the caller graph for this function:

◆ vnet_crypto_async_free_frame()

static_always_inline void vnet_crypto_async_free_frame ( vlib_main_t vm,
vnet_crypto_async_frame_t frame 
)

Definition at line 580 of file crypto.h.

+ Here is the caller graph for this function:

◆ vnet_crypto_async_get_frame()

static_always_inline vnet_crypto_async_frame_t* vnet_crypto_async_get_frame ( vlib_main_t vm,
vnet_crypto_async_op_id_t  opt 
)

async crypto inline functions

Definition at line 563 of file crypto.h.

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

◆ vnet_crypto_async_reset_frame()

static_always_inline void vnet_crypto_async_reset_frame ( vnet_crypto_async_frame_t f)

Definition at line 650 of file crypto.h.

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

◆ vnet_crypto_async_submit_open_frame()

static_always_inline int vnet_crypto_async_submit_open_frame ( vlib_main_t vm,
vnet_crypto_async_frame_t frame 
)

Definition at line 589 of file crypto.h.

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

◆ vnet_crypto_get_key()

Definition at line 548 of file crypto.h.

+ Here is the caller graph for this function:

◆ vnet_crypto_get_op_type()

Definition at line 539 of file crypto.h.

◆ vnet_crypto_is_set_async_handler()

int vnet_crypto_is_set_async_handler ( vnet_crypto_async_op_id_t  opt)

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_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_op_init()

static_always_inline void vnet_crypto_op_init ( vnet_crypto_op_t op,
vnet_crypto_op_id_t  type 
)

Definition at line 528 of file crypto.h.

+ Here is the call graph for this function:
+ 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_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 enq_fn,
vnet_crypto_frame_dequeue_t deq_fn 
)

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 oph 
)

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 keyh 
)

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 oph 
)

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_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_handler()

static_always_inline int vnet_crypto_set_handler ( char *  alg_name,
char *  engine 
)

Definition at line 555 of file crypto.h.

+ Here is the call graph for this function:

◆ vnet_crypto_set_handler2()

int vnet_crypto_set_handler2 ( char *  ops_handler_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.

◆ format_vnet_crypto_alg

format_function_t format_vnet_crypto_alg

Definition at line 516 of file crypto.h.

◆ format_vnet_crypto_async_alg

format_function_t format_vnet_crypto_async_alg

Definition at line 524 of file crypto.h.

◆ format_vnet_crypto_async_op

format_function_t format_vnet_crypto_async_op

Definition at line 523 of file crypto.h.

◆ format_vnet_crypto_async_op_type

format_function_t format_vnet_crypto_async_op_type

Definition at line 525 of file crypto.h.

◆ format_vnet_crypto_engine

format_function_t format_vnet_crypto_engine

Definition at line 517 of file crypto.h.

◆ format_vnet_crypto_op

format_function_t format_vnet_crypto_op

Definition at line 518 of file crypto.h.

◆ format_vnet_crypto_op_status

format_function_t format_vnet_crypto_op_status

Definition at line 520 of file crypto.h.

◆ format_vnet_crypto_op_type

format_function_t format_vnet_crypto_op_type

Definition at line 519 of file crypto.h.

◆ unformat_vnet_crypto_alg

unformat_function_t unformat_vnet_crypto_alg

Definition at line 521 of file crypto.h.