FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
cryptodev.h File Reference
+ Include dependency graph for cryptodev.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cryptodev_key_t
 
struct  cryptodev_capability_t
 
struct  cryptodev_inst_t
 
struct  cryptodev_numa_data_t
 
struct  cryptodev_op_t
 
struct  cryptodev_engine_thread_t
 
struct  cryptodev_main_t
 

Macros

#define CRYPTODEV_NB_CRYPTO_OPS   1024
 
#define CRYPTODEV_CACHE_QUEUE_SIZE   VNET_CRYPTO_FRAME_POOL_SIZE
 
#define CRYPTODEV_CACHE_QUEUE_MASK   (VNET_CRYPTO_FRAME_POOL_SIZE - 1)
 
#define CRYPTODEV_MAX_INFLIGHT   (CRYPTODEV_NB_CRYPTO_OPS - 1)
 
#define CRYPTODEV_AAD_MASK   (CRYPTODEV_NB_CRYPTO_OPS - 1)
 
#define CRYPTODEV_DEQ_CACHE_SZ   32
 
#define CRYPTODEV_NB_SESSION   10240
 
#define CRYPTODEV_MAX_IV_SIZE   16
 
#define CRYPTODEV_MAX_AAD_SIZE   16
 
#define CRYPTODEV_MAX_N_SGL   8
 maximum number of segments More...
 
#define CRYPTODEV_IV_OFFSET   (offsetof (cryptodev_op_t, iv))
 
#define CRYPTODEV_AAD_OFFSET   (offsetof (cryptodev_op_t, aad))
 
#define foreach_vnet_aead_crypto_conversion
 
#define foreach_cryptodev_link_async_alg
 crypto (alg, cryptodev_alg, key_size), hash (alg, digest-size) More...
 

Enumerations

enum  cryptodev_op_type_t { CRYPTODEV_OP_TYPE_ENCRYPT = 0, CRYPTODEV_OP_TYPE_DECRYPT, CRYPTODEV_N_OP_TYPES }
 

Functions

static_always_inline void cryptodev_mark_frame_err_status (vnet_crypto_async_frame_t *f, vnet_crypto_op_status_t s)
 
int cryptodev_session_create (vlib_main_t *vm, vnet_crypto_key_index_t idx, u32 aad_len)
 
void cryptodev_sess_handler (vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx, u32 aad_len)
 
int cryptodev_check_cap_support (struct rte_cryptodev_sym_capability_idx *idx, u32 key_size, u32 digest_size, u32 aad_size)
 
clib_error_tcryptodev_register_cop_hdl (vlib_main_t *vm, u32 eidx)
 
clib_error_t *__clib_weak cryptodev_register_raw_hdl (vlib_main_t *vm, u32 eidx)
 
clib_error_t *__clib_weak dpdk_cryptodev_init (vlib_main_t *vm)
 

Variables

cryptodev_main_t cryptodev_main
 

Macro Definition Documentation

◆ CRYPTODEV_AAD_MASK

#define CRYPTODEV_AAD_MASK   (CRYPTODEV_NB_CRYPTO_OPS - 1)

Definition at line 28 of file cryptodev.h.

◆ CRYPTODEV_AAD_OFFSET

#define CRYPTODEV_AAD_OFFSET   (offsetof (cryptodev_op_t, aad))

Definition at line 36 of file cryptodev.h.

◆ CRYPTODEV_CACHE_QUEUE_MASK

#define CRYPTODEV_CACHE_QUEUE_MASK   (VNET_CRYPTO_FRAME_POOL_SIZE - 1)

Definition at line 26 of file cryptodev.h.

◆ CRYPTODEV_CACHE_QUEUE_SIZE

#define CRYPTODEV_CACHE_QUEUE_SIZE   VNET_CRYPTO_FRAME_POOL_SIZE

Definition at line 25 of file cryptodev.h.

◆ CRYPTODEV_DEQ_CACHE_SZ

#define CRYPTODEV_DEQ_CACHE_SZ   32

Definition at line 29 of file cryptodev.h.

◆ CRYPTODEV_IV_OFFSET

#define CRYPTODEV_IV_OFFSET   (offsetof (cryptodev_op_t, iv))

Definition at line 35 of file cryptodev.h.

◆ CRYPTODEV_MAX_AAD_SIZE

#define CRYPTODEV_MAX_AAD_SIZE   16

Definition at line 32 of file cryptodev.h.

◆ CRYPTODEV_MAX_INFLIGHT

#define CRYPTODEV_MAX_INFLIGHT   (CRYPTODEV_NB_CRYPTO_OPS - 1)

Definition at line 27 of file cryptodev.h.

◆ CRYPTODEV_MAX_IV_SIZE

#define CRYPTODEV_MAX_IV_SIZE   16

Definition at line 31 of file cryptodev.h.

◆ CRYPTODEV_MAX_N_SGL

#define CRYPTODEV_MAX_N_SGL   8

maximum number of segments

Definition at line 33 of file cryptodev.h.

◆ CRYPTODEV_NB_CRYPTO_OPS

#define CRYPTODEV_NB_CRYPTO_OPS   1024

Definition at line 24 of file cryptodev.h.

◆ CRYPTODEV_NB_SESSION

#define CRYPTODEV_NB_SESSION   10240

Definition at line 30 of file cryptodev.h.

◆ foreach_cryptodev_link_async_alg

#define foreach_cryptodev_link_async_alg
Value:
_ (AES_128_CBC, AES_CBC, 16, MD5, 12) \
_ (AES_192_CBC, AES_CBC, 24, MD5, 12) \
_ (AES_256_CBC, AES_CBC, 32, MD5, 12) \
_ (AES_128_CBC, AES_CBC, 16, SHA1, 12) \
_ (AES_192_CBC, AES_CBC, 24, SHA1, 12) \
_ (AES_256_CBC, AES_CBC, 32, SHA1, 12) \
_ (AES_128_CBC, AES_CBC, 16, SHA224, 14) \
_ (AES_192_CBC, AES_CBC, 24, SHA224, 14) \
_ (AES_256_CBC, AES_CBC, 32, SHA224, 14) \
_ (AES_128_CBC, AES_CBC, 16, SHA256, 16) \
_ (AES_192_CBC, AES_CBC, 24, SHA256, 16) \
_ (AES_256_CBC, AES_CBC, 32, SHA256, 16) \
_ (AES_128_CBC, AES_CBC, 16, SHA384, 24) \
_ (AES_192_CBC, AES_CBC, 24, SHA384, 24) \
_ (AES_256_CBC, AES_CBC, 32, SHA384, 24) \
_ (AES_128_CBC, AES_CBC, 16, SHA512, 32) \
_ (AES_192_CBC, AES_CBC, 24, SHA512, 32) \
_ (AES_256_CBC, AES_CBC, 32, SHA512, 32)

crypto (alg, cryptodev_alg, key_size), hash (alg, digest-size)

Definition at line 51 of file cryptodev.h.

◆ foreach_vnet_aead_crypto_conversion

#define foreach_vnet_aead_crypto_conversion
Value:
_ (AES_128_GCM, AEAD, AES_GCM, 12, 16, 8, 16) \
_ (AES_128_GCM, AEAD, AES_GCM, 12, 16, 12, 16) \
_ (AES_192_GCM, AEAD, AES_GCM, 12, 16, 8, 24) \
_ (AES_192_GCM, AEAD, AES_GCM, 12, 16, 12, 24) \
_ (AES_256_GCM, AEAD, AES_GCM, 12, 16, 8, 32) \
_ (AES_256_GCM, AEAD, AES_GCM, 12, 16, 12, 32)

Definition at line 40 of file cryptodev.h.

Enumeration Type Documentation

◆ cryptodev_op_type_t

Enumerator
CRYPTODEV_OP_TYPE_ENCRYPT 
CRYPTODEV_OP_TYPE_DECRYPT 
CRYPTODEV_N_OP_TYPES 

Definition at line 71 of file cryptodev.h.

Function Documentation

◆ cryptodev_check_cap_support()

int cryptodev_check_cap_support ( struct rte_cryptodev_sym_capability_idx *  idx,
u32  key_size,
u32  digest_size,
u32  aad_size 
)

Definition at line 719 of file cryptodev.c.

+ Here is the call graph for this function:

◆ cryptodev_mark_frame_err_status()

static_always_inline void cryptodev_mark_frame_err_status ( vnet_crypto_async_frame_t f,
vnet_crypto_op_status_t  s 
)

Definition at line 179 of file cryptodev.h.

+ Here is the caller graph for this function:

◆ cryptodev_register_cop_hdl()

clib_error_t* cryptodev_register_cop_hdl ( vlib_main_t vm,
u32  eidx 
)

INDENT-OFF

INDENT-ON

Definition at line 509 of file cryptodev_op_data_path.c.

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

◆ cryptodev_register_raw_hdl()

clib_error_t* __clib_weak cryptodev_register_raw_hdl ( vlib_main_t vm,
u32  eidx 
)

INDENT-OFF

Definition at line 618 of file cryptodev_raw_data_path.c.

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

◆ cryptodev_sess_handler()

void cryptodev_sess_handler ( vlib_main_t vm,
vnet_crypto_key_op_t  kop,
vnet_crypto_key_index_t  idx,
u32  aad_len 
)

Definition at line 272 of file cryptodev.c.

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

◆ cryptodev_session_create()

int cryptodev_session_create ( vlib_main_t vm,
vnet_crypto_key_index_t  idx,
u32  aad_len 
)

Definition at line 326 of file cryptodev.c.

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

◆ dpdk_cryptodev_init()

clib_error_t* __clib_weak dpdk_cryptodev_init ( vlib_main_t vm)

Definition at line 1061 of file cryptodev.c.

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

Variable Documentation

◆ cryptodev_main

cryptodev_main_t cryptodev_main

Definition at line 43 of file cryptodev.c.