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",
336 if (state == VLIB_NODE_STATE_POLLING)
338 if (state == VLIB_NODE_STATE_INTERRUPT)
340 if (state == VLIB_NODE_STATE_DISABLED)
349 .path =
"show crypto async status",
350 .short_help =
"show crypto async status",
363 char **args = 0, *s, **arg, *engine = 0;
374 else if (
unformat (line_input,
"%s", &s))
401 rc += vnet_crypto_set_async_handler2 (key, engine);
432 .path =
"set crypto async handler",
433 .short_help =
"set crypto async handler type [type2 type3 ...] engine",
441 clib_warning (
"Switching dispatch mode might not work is some situations.");
443 (
"Use 'show crypto async status' to verify that the nodes' states were set");
444 clib_warning (
"and if not, set 'crypto async dispatch' mode again.");
470 .path =
"set crypto async dispatch polling",
471 .short_help =
"set crypto async dispatch polling|interrupt",
476 .path =
"set crypto async dispatch interrupt",
477 .short_help =
"set crypto async dispatch polling|interrupt",
static clib_error_t * set_crypto_async_dispatch_interrupt_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vnet_crypto_op_type
uword * async_alg_index_by_name
void vnet_crypto_set_async_dispatch_mode(u8 mode)
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)
vlib_main_t ** vlib_mains
#define VNET_CRYPTO_ASYNC_DISPATCH_POLLING
static u8 * format_vnet_crypto_async_handlers(u8 *s, va_list *args)
static clib_error_t * show_crypto_async_status_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_crypto_set_handler2(char *alg_name, char *engine, crypto_op_class_type_t oct)
u32 active_engine_index_chained
description fragment has unexpected format
#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 vlib_node_state_t vlib_node_get_state(vlib_main_t *vm, u32 node_index)
Get node dispatch state.
static void print_crypto_async_dispatch_warning()
static heap_elt_t * first(heap_header_t *h)
u32 active_engine_index_async
#define VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT
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
#define clib_warning(format, args...)
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
static clib_error_t * set_crypto_async_dispatch_polling_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
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]
static vlib_thread_main_t * vlib_get_thread_main()
vl_api_dhcp_client_state_t state
static u32 vlib_num_workers()
#define vec_foreach(var, vec)
Vector iterator.
vnet_crypto_main_t crypto_main