|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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);
73 if (ei == e -
cm->engines)
74 s =
format (s,
"%c ",
'*');
92 if (ei == e -
cm->engines)
93 s =
format (s,
"%c ",
'*');
119 od =
cm->opt_data +
id;
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"
271 od =
cm->async_opt_data +
id;
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 u8 * format_vnet_crypto_handlers(u8 *s, va_list *args)
static vlib_cli_command_t set_crypto_async_dispatch_interrupt_command
(constructor) VLIB_CLI_COMMAND (set_crypto_async_dispatch_interrupt_command)
static u32 vlib_num_workers()
format_function_t format_vnet_crypto_async_op_type
static vlib_cli_command_t show_crypto_engines_command
(constructor) VLIB_CLI_COMMAND (show_crypto_engines_command)
static clib_error_t * show_crypto_handlers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
@ VNET_CRYPTO_ASYNC_OP_N_TYPES
static vlib_cli_command_t set_crypto_handler_command
(constructor) VLIB_CLI_COMMAND (set_crypto_handler_command)
#define clib_error_return(e, args...)
static clib_error_t * set_crypto_async_dispatch_polling_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u8 * format_vnet_crypto_async_handlers(u8 *s, va_list *args)
@ VNET_CRYPTO_N_ASYNC_ALGS
static heap_elt_t * first(heap_header_t *h)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_dhcp_client_state_t state
vnet_crypto_async_op_id_t op_by_type[VNET_CRYPTO_ASYNC_OP_N_TYPES]
static clib_error_t * show_crypto_async_status_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t set_crypto_async_handler_command
(constructor) VLIB_CLI_COMMAND (set_crypto_async_handler_command)
#define VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT
#define VNET_CRYPTO_ASYNC_DISPATCH_POLLING
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vnet_crypto_async_op_type_t type
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
void vnet_crypto_set_async_dispatch_mode(u8 mode)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vnet_crypto_frame_enqueue_t * enqueue_handlers[VNET_CRYPTO_ASYNC_OP_N_IDS]
u32 active_engine_index_simple
static u8 * format_vnet_crypto_engine_candidates(u8 *s, va_list *args)
vnet_feature_config_main_t * cm
#define VLIB_CLI_COMMAND(x,...)
static vlib_cli_command_t set_crypto_async_dispatch_polling_command
(constructor) VLIB_CLI_COMMAND (set_crypto_async_dispatch_polling_command)
static vlib_cli_command_t show_crypto_async_handlers_command
(constructor) VLIB_CLI_COMMAND (show_crypto_async_handlers_command)
static void print_crypto_async_dispatch_warning()
static clib_error_t * set_crypto_handler_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * set_crypto_async_dispatch_interrupt_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_crypto_main_t crypto_main
u32 active_engine_index_chained
#define vec_free(V)
Free vector's memory (no header).
vnet_crypto_op_type_t type
vnet_crypto_op_id_t op_by_type[VNET_CRYPTO_OP_N_TYPES]
description fragment has unexpected format
static vlib_cli_command_t show_crypto_handlers_command
(constructor) VLIB_CLI_COMMAND (show_crypto_handlers_command)
static clib_error_t * show_crypto_engines_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_foreach(var, vec)
Vector iterator.
static vlib_main_t * vlib_get_main_by_index(u32 thread_index)
static clib_error_t * set_crypto_async_handler_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_crypto_set_async_handler2(char *alg_name, char *engine)
format_function_t format_vnet_crypto_async_alg
vnet_crypto_frame_dequeue_t * dequeue_handlers[VNET_CRYPTO_ASYNC_OP_N_IDS]
vnet_crypto_ops_handler_t * ops_handlers[VNET_CRYPTO_N_OP_IDS]
vnet_crypto_async_op_id_t
format_function_t format_vnet_crypto_engine
#define clib_warning(format, args...)
static clib_error_t * show_crypto_async_handlers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t show_crypto_async_status_command
(constructor) VLIB_CLI_COMMAND (show_crypto_async_status_command)
format_function_t format_vnet_crypto_alg
u32 active_engine_index_async
static vlib_thread_main_t * vlib_get_thread_main()
#define hash_foreach_mem(key_var, value_var, h, body)
int vnet_crypto_set_handler2(char *alg_name, char *engine, crypto_op_class_type_t oct)
#define vec_del1(v, i)
Delete the element at index I.
static vlib_node_state_t vlib_node_get_state(vlib_main_t *vm, u32 node_index)
Get node dispatch state.
format_function_t format_vnet_crypto_op_type
vnet_crypto_chained_ops_handler_t * chained_ops_handlers[VNET_CRYPTO_N_OP_IDS]