51 .path =
"show crypto engines",
52 .short_help =
"show crypto engines",
61 u32 id = va_arg (*args,
u32);
62 u32 ei = va_arg (*args,
u32);
63 int is_chained = va_arg (*args,
int);
64 int is_async = va_arg (*args,
int);
74 s =
format (s,
"%c ",
'*');
93 s =
format (s,
"%c ",
'*');
157 .path =
"show crypto handlers",
158 .short_help =
"show crypto handlers",
171 char **args = 0, *s, **arg, *engine = 0;
183 else if (
unformat (line_input,
"simple"))
185 else if (
unformat (line_input,
"chained"))
187 else if (
unformat (line_input,
"both"))
189 else if (
unformat (line_input,
"%s", &s))
216 rc += vnet_crypto_set_handler2 (key, engine, oct);
247 .path =
"set crypto handler",
248 .short_help =
"set crypto handler cipher [cipher2 cipher3 ...] engine" 306 .path =
"show crypto async handlers",
307 .short_help =
"show crypto async handlers",
321 char **args = 0, *s, **arg, *engine = 0;
332 else if (
unformat (line_input,
"%s", &s))
359 rc += vnet_crypto_set_async_handler2 (key, engine);
390 .path =
"set crypto async handler",
391 .short_help =
"set crypto async handler type [type2 type3 ...] engine",
format_function_t format_vnet_crypto_op_type
uword * async_alg_index_by_name
vnet_crypto_engine_t * engines
uword * alg_index_by_name
vnet_crypto_async_op_id_t op_by_type[VNET_CRYPTO_ASYNC_OP_N_TYPES]
static clib_error_t * show_crypto_handlers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_crypto_op_data_t opt_data[VNET_CRYPTO_N_OP_IDS]
int vnet_crypto_set_async_handler2(char *alg_name, char *engine)
vnet_crypto_alg_data_t * algs
vnet_crypto_op_id_t op_by_type[VNET_CRYPTO_OP_N_TYPES]
vnet_crypto_async_alg_data_t * async_algs
format_function_t format_vnet_crypto_alg
vnet_crypto_async_op_type_t type
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static clib_error_t * show_crypto_async_handlers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_crypto_frame_dequeue_t * dequeue_handlers[VNET_CRYPTO_ASYNC_OP_N_IDS]
static u8 * format_vnet_crypto_engine_candidates(u8 *s, va_list *args)
static u8 * format_vnet_crypto_async_handlers(u8 *s, va_list *args)
int vnet_crypto_set_handler2(char *alg_name, char *engine, crypto_op_class_type_t oct)
u32 active_engine_index_chained
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define clib_error_return(e, args...)
static heap_elt_t * first(heap_header_t *h)
u32 active_engine_index_async
u32 active_engine_index_simple
#define vec_del1(v, i)
Delete the element at index I.
#define hash_foreach_mem(key_var, value_var, h, body)
static clib_error_t * show_crypto_engines_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * set_crypto_async_handler_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vnet_crypto_async_op_type
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
format_function_t format_vnet_crypto_async_alg
vnet_crypto_chained_ops_handler_t * chained_ops_handlers[VNET_CRYPTO_N_OP_IDS]
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * set_crypto_handler_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_crypto_async_op_data_t async_opt_data[VNET_CRYPTO_ASYNC_OP_N_IDS]
vnet_crypto_async_op_id_t
static u8 * format_vnet_crypto_handlers(u8 *s, va_list *args)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
format_function_t format_vnet_crypto_engine
vnet_crypto_op_type_t type
vnet_crypto_ops_handler_t * ops_handlers[VNET_CRYPTO_N_OP_IDS]
vnet_crypto_frame_enqueue_t * enqueue_handlers[VNET_CRYPTO_ASYNC_OP_N_IDS]
#define vec_foreach(var, vec)
Vector iterator.
vnet_crypto_main_t crypto_main