FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
cryptodev.c File Reference
+ Include dependency graph for cryptodev.c:

Go to the source code of this file.

Macros

#define always_inline   static inline
 

Enumerations

enum  cryptodev_resource_assign_op_t { CRYPTODEV_RESOURCE_ASSIGN_AUTO = 0, CRYPTODEV_RESOURCE_ASSIGN_UPDATE }
 

Functions

static_always_inline int prepare_aead_xform (struct rte_crypto_sym_xform *xform, cryptodev_op_type_t op_type, const vnet_crypto_key_t *key, u32 aad_len)
 
static_always_inline int prepare_linked_xform (struct rte_crypto_sym_xform *xforms, cryptodev_op_type_t op_type, const vnet_crypto_key_t *key)
 
static_always_inline void cryptodev_session_del (struct rte_cryptodev_sym_session *sess)
 
static int check_cipher_support (enum rte_crypto_cipher_algorithm algo, u32 key_size)
 
static int check_auth_support (enum rte_crypto_auth_algorithm algo, u32 digest_size)
 
static_always_inline int check_aead_support (enum rte_crypto_aead_algorithm algo, u32 key_size, u32 digest_size, u32 aad_size)
 
static_always_inline int cryptodev_check_supported_vnet_alg (vnet_crypto_key_t *key)
 
void cryptodev_sess_handler (vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx, u32 aad_len)
 
void cryptodev_key_handler (vlib_main_t *vm, vnet_crypto_key_op_t kop, vnet_crypto_key_index_t idx)
 
int cryptodev_session_create (vlib_main_t *vm, vnet_crypto_key_index_t idx, u32 aad_len)
 
static_always_inline int cryptodev_assign_resource (cryptodev_engine_thread_t *cet, u32 cryptodev_inst_index, cryptodev_resource_assign_op_t op)
 assign a cryptodev resource to a worker. More...
 
static u8format_cryptodev_inst (u8 *s, va_list *args)
 
static clib_error_tcryptodev_show_assignment_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tcryptodev_set_assignment_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u32 cryptodev_count_queue (u32 numa)
 
static int cryptodev_configure (vlib_main_t *vm, u32 cryptodev_id)
 
static int cryptodev_cmp (void *v1, void *v2)
 
static int cryptodev_supports_param_value (u32 *params, u32 param_value)
 
int cryptodev_check_cap_support (struct rte_cryptodev_sym_capability_idx *idx, u32 key_size, u32 digest_size, u32 aad_size)
 
static void remove_unsupported_param_size (u32 **param_sizes, u32 param_size_min, u32 param_size_max, u32 increment)
 
static void cryptodev_delete_cap (cryptodev_capability_t **temp_caps, u32 temp_cap_id)
 
static u32 cryptodev_remove_unsupported_param_sizes (cryptodev_capability_t *temp_cap, const struct rte_cryptodev_capabilities *dev_caps)
 
static void cryptodev_get_common_capabilities ()
 
static int cryptodev_probe (vlib_main_t *vm, u32 n_workers)
 
static void cryptodev_get_max_sz (u32 *max_sess_sz, u32 *max_dp_sz)
 
static void dpdk_disable_cryptodev_engine (vlib_main_t *vm)
 
clib_error_tdpdk_cryptodev_init (vlib_main_t *vm)
 

Variables

cryptodev_main_t cryptodev_main
 
static vlib_cli_command_t show_cryptodev_assignment
 (constructor) VLIB_CLI_COMMAND (show_cryptodev_assignment) More...
 
static vlib_cli_command_t set_cryptodev_assignment
 (constructor) VLIB_CLI_COMMAND (set_cryptodev_assignment) More...
 

Macro Definition Documentation

◆ always_inline

#define always_inline   static inline

Definition at line 38 of file cryptodev.c.

Enumeration Type Documentation

◆ cryptodev_resource_assign_op_t

Enumerator
CRYPTODEV_RESOURCE_ASSIGN_AUTO 
CRYPTODEV_RESOURCE_ASSIGN_UPDATE 

Definition at line 414 of file cryptodev.c.

Function Documentation

◆ check_aead_support()

static_always_inline int check_aead_support ( enum rte_crypto_aead_algorithm  algo,
u32  key_size,
u32  digest_size,
u32  aad_size 
)

Definition at line 196 of file cryptodev.c.

◆ check_auth_support()

static int check_auth_support ( enum rte_crypto_auth_algorithm  algo,
u32  digest_size 
)
static

Definition at line 175 of file cryptodev.c.

◆ check_cipher_support()

static int check_cipher_support ( enum rte_crypto_cipher_algorithm  algo,
u32  key_size 
)
static

Definition at line 154 of file cryptodev.c.

◆ cryptodev_assign_resource()

static_always_inline int cryptodev_assign_resource ( cryptodev_engine_thread_t cet,
u32  cryptodev_inst_index,
cryptodev_resource_assign_op_t  op 
)

assign a cryptodev resource to a worker.

Parameters
cetthe worker thread data
cryptodev_inst_indexif op is "ASSIGN_AUTO" this param is ignored.
opthe assignment method.
Returns
: 0 if successfully, negative number otherwise.

Definition at line 428 of file cryptodev.c.

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

◆ 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_check_supported_vnet_alg()

static_always_inline int cryptodev_check_supported_vnet_alg ( vnet_crypto_key_t key)

Definition at line 237 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_cmp()

static int cryptodev_cmp ( void *  v1,
void *  v2 
)
static

Definition at line 694 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_configure()

static int cryptodev_configure ( vlib_main_t vm,
u32  cryptodev_id 
)
static

Definition at line 636 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_count_queue()

static u32 cryptodev_count_queue ( u32  numa)
static

Definition at line 620 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_delete_cap()

static void cryptodev_delete_cap ( cryptodev_capability_t **  temp_caps,
u32  temp_cap_id 
)
static

Definition at line 781 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_get_common_capabilities()

static void cryptodev_get_common_capabilities ( )
static

Definition at line 872 of file cryptodev.c.

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

◆ cryptodev_get_max_sz()

static void cryptodev_get_max_sz ( u32 max_sess_sz,
u32 max_dp_sz 
)
static

Definition at line 1020 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_key_handler()

void cryptodev_key_handler ( vlib_main_t vm,
vnet_crypto_key_op_t  kop,
vnet_crypto_key_index_t  idx 
)

Definition at line 319 of file cryptodev.c.

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

◆ cryptodev_probe()

static int cryptodev_probe ( vlib_main_t vm,
u32  n_workers 
)
static

Definition at line 995 of file cryptodev.c.

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

◆ cryptodev_remove_unsupported_param_sizes()

static u32 cryptodev_remove_unsupported_param_sizes ( cryptodev_capability_t temp_cap,
const struct rte_cryptodev_capabilities *  dev_caps 
)
static

Definition at line 805 of file cryptodev.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:

◆ cryptodev_session_del()

static_always_inline void cryptodev_session_del ( struct rte_cryptodev_sym_session *  sess)

Definition at line 138 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ cryptodev_set_assignment_fn()

static clib_error_t* cryptodev_set_assignment_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 550 of file cryptodev.c.

+ Here is the call graph for this function:

◆ cryptodev_show_assignment_fn()

static clib_error_t* cryptodev_show_assignment_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 519 of file cryptodev.c.

+ Here is the call graph for this function:

◆ cryptodev_supports_param_value()

static int cryptodev_supports_param_value ( u32 params,
u32  param_value 
)
static

Definition at line 707 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ dpdk_cryptodev_init()

clib_error_t* 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:

◆ dpdk_disable_cryptodev_engine()

static void dpdk_disable_cryptodev_engine ( vlib_main_t vm)
static

Definition at line 1040 of file cryptodev.c.

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

◆ format_cryptodev_inst()

static u8* format_cryptodev_inst ( u8 s,
va_list *  args 
)
static

Definition at line 487 of file cryptodev.c.

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

◆ prepare_aead_xform()

static_always_inline int prepare_aead_xform ( struct rte_crypto_sym_xform *  xform,
cryptodev_op_type_t  op_type,
const vnet_crypto_key_t key,
u32  aad_len 
)

Definition at line 46 of file cryptodev.c.

+ Here is the caller graph for this function:

◆ prepare_linked_xform()

static_always_inline int prepare_linked_xform ( struct rte_crypto_sym_xform *  xforms,
cryptodev_op_type_t  op_type,
const vnet_crypto_key_t key 
)

Definition at line 74 of file cryptodev.c.

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

◆ remove_unsupported_param_size()

static void remove_unsupported_param_size ( u32 **  param_sizes,
u32  param_size_min,
u32  param_size_max,
u32  increment 
)
static

Definition at line 752 of file cryptodev.c.

+ 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.

◆ set_cryptodev_assignment

vlib_cli_command_t set_cryptodev_assignment
static
Initial value:
= {
.path = "set cryptodev assignment",
.short_help = "set cryptodev assignment thread <thread_index> "
"resource <inst_index>",
}

(constructor) VLIB_CLI_COMMAND (set_cryptodev_assignment)

Definition at line 612 of file cryptodev.c.

◆ show_cryptodev_assignment

vlib_cli_command_t show_cryptodev_assignment
static
Initial value:
= {
.path = "show cryptodev assignment",
.short_help = "show cryptodev assignment",
}

(constructor) VLIB_CLI_COMMAND (show_cryptodev_assignment)

Definition at line 543 of file cryptodev.c.

cryptodev_set_assignment_fn
static clib_error_t * cryptodev_set_assignment_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cryptodev.c:550
cryptodev_show_assignment_fn
static clib_error_t * cryptodev_show_assignment_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cryptodev.c:519