FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
cli.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <stdbool.h>
17 #include <vlib/vlib.h>
18 #include <vnet/crypto/crypto.h>
19 
20 static clib_error_t *
22  unformat_input_t * input,
23  vlib_cli_command_t * cmd)
24 {
25  unformat_input_t _line_input, *line_input = &_line_input;
28 
29  if (unformat_user (input, unformat_line_input, line_input))
30  unformat_free (line_input);
31 
32  if (vec_len (cm->engines) == 0)
33  {
34  vlib_cli_output (vm, "No crypto engines registered");
35  return 0;
36  }
37 
38  vlib_cli_output (vm, "%-20s%-8s%s", "Name", "Prio", "Description");
39  /* *INDENT-OFF* */
40  vec_foreach (p, cm->engines)
41  {
42  vlib_cli_output (vm, "%-20s%-8u%s", p->name, p->priority, p->desc);
43  }
44  /* *INDENT-ON* */
45  return 0;
46 }
47 
48 /* *INDENT-OFF* */
50 {
51  .path = "show crypto engines",
52  .short_help = "show crypto engines",
54 };
55 
56 static u8 *
58 {
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);
65 
66  if (is_async)
67  {
68  vec_foreach (e, cm->engines)
69  {
70  if (e->enqueue_handlers[id] && e->dequeue_handlers[id])
71  {
72  s = format (s, "%U", format_vnet_crypto_engine, e - cm->engines);
73  if (ei == e - cm->engines)
74  s = format (s, "%c ", '*');
75  else
76  s = format (s, " ");
77  }
78  }
79 
80  return s;
81  }
82  else
83  {
84  vec_foreach (e, cm->engines)
85  {
86  void * h = is_chained ? (void *) e->chained_ops_handlers[id]
87  : (void *) e->ops_handlers[id];
88 
89  if (h)
90  {
91  s = format (s, "%U", format_vnet_crypto_engine, e - cm->engines);
92  if (ei == e - cm->engines)
93  s = format (s, "%c ", '*');
94  else
95  s = format (s, " ");
96  }
97  }
98  return s;
99  }
100 }
101 
102 static u8 *
103 format_vnet_crypto_handlers (u8 * s, va_list * args)
104 {
105  vnet_crypto_alg_t alg = va_arg (*args, vnet_crypto_alg_t);
107  vnet_crypto_alg_data_t *d = vec_elt_at_index (cm->algs, alg);
108  u32 indent = format_get_indent (s);
109  int i, first = 1;
110 
111  for (i = 0; i < VNET_CRYPTO_OP_N_TYPES; i++)
112  {
115 
116  if (id == 0)
117  continue;
118 
119  od = cm->opt_data + id;
120  if (first == 0)
121  s = format (s, "\n%U", format_white_space, indent);
122  s = format (s, "%-16U", format_vnet_crypto_op_type, od->type);
123 
124  s = format (s, "%-28U", format_vnet_crypto_engine_candidates, id,
125  od->active_engine_index_simple, 0, 0);
127  od->active_engine_index_chained, 1, 0);
128  first = 0;
129  }
130  return s;
131 }
132 
133 
134 static clib_error_t *
136  unformat_input_t * input, vlib_cli_command_t * cmd)
137 {
138  unformat_input_t _line_input, *line_input = &_line_input;
139  int i;
140 
141  if (unformat_user (input, unformat_line_input, line_input))
142  unformat_free (line_input);
143 
144  vlib_cli_output (vm, "%-16s%-16s%-28s%s", "Algo", "Type", "Simple",
145  "Chained");
146 
147  for (i = 0; i < VNET_CRYPTO_N_ALGS; i++)
150 
151  return 0;
152 }
153 
154 /* *INDENT-OFF* */
156 {
157  .path = "show crypto handlers",
158  .short_help = "show crypto handlers",
160 };
161 /* *INDENT-ON* */
162 
163 static clib_error_t *
165  unformat_input_t * input,
166  vlib_cli_command_t * cmd)
167 {
168  unformat_input_t _line_input, *line_input = &_line_input;
170  int rc = 0;
171  char **args = 0, *s, **arg, *engine = 0;
172  int all = 0;
173  clib_error_t *error = 0;
175 
176  if (!unformat_user (input, unformat_line_input, line_input))
177  return 0;
178 
179  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
180  {
181  if (unformat (line_input, "all"))
182  all = 1;
183  else if (unformat (line_input, "simple"))
184  oct = CRYPTO_OP_SIMPLE;
185  else if (unformat (line_input, "chained"))
186  oct = CRYPTO_OP_CHAINED;
187  else if (unformat (line_input, "both"))
188  oct = CRYPTO_OP_BOTH;
189  else if (unformat (line_input, "%s", &s))
190  vec_add1 (args, s);
191  else
192  {
193  error = clib_error_return (0, "invalid params");
194  goto done;
195  }
196  }
197 
198  if ((vec_len (args) < 2 && !all) || (vec_len (args) == 0 && all))
199  {
200  error = clib_error_return (0, "missing cipher or engine!");
201  goto done;
202  }
203 
204  engine = vec_elt_at_index (args, vec_len (args) - 1)[0];
205  vec_del1 (args, vec_len (args) - 1);
206 
207  if (all)
208  {
209  char *key;
210  u8 *value;
211 
212  /* *INDENT-OFF* */
213  hash_foreach_mem (key, value, cm->alg_index_by_name,
214  ({
215  (void) value;
216  rc += vnet_crypto_set_handler2 (key, engine, oct);
217  }));
218  /* *INDENT-ON* */
219 
220  if (rc)
221  vlib_cli_output (vm, "failed to set crypto engine!");
222  }
223  else
224  {
225  vec_foreach (arg, args)
226  {
227  rc = vnet_crypto_set_handler2 (arg[0], engine, oct);
228  if (rc)
229  {
230  vlib_cli_output (vm, "failed to set engine %s for %s!",
231  engine, arg[0]);
232  }
233  }
234  }
235 
236 done:
237  vec_free (engine);
238  vec_foreach (arg, args) vec_free (arg[0]);
239  vec_free (args);
240  unformat_free (line_input);
241  return error;
242 }
243 
244 /* *INDENT-OFF* */
246 {
247  .path = "set crypto handler",
248  .short_help = "set crypto handler cipher [cipher2 cipher3 ...] engine"
249  " [simple|chained]",
250  .function = set_crypto_handler_command_fn,
251 };
252 /* *INDENT-ON* */
253 
254 static u8 *
256 {
257  vnet_crypto_async_alg_t alg = va_arg (*args, vnet_crypto_async_alg_t);
259  vnet_crypto_async_alg_data_t *d = vec_elt_at_index (cm->async_algs, alg);
260  u32 indent = format_get_indent (s);
261  int i, first = 1;
262 
263  for (i = 0; i < VNET_CRYPTO_ASYNC_OP_N_TYPES; i++)
264  {
267 
268  if (id == 0)
269  continue;
270 
271  od = cm->async_opt_data + id;
272  if (first == 0)
273  s = format (s, "\n%U", format_white_space, indent);
274  s = format (s, "%-16U", format_vnet_crypto_async_op_type, od->type);
275 
277  od->active_engine_index_async, 0, 1);
278  first = 0;
279  }
280  return s;
281 }
282 
283 static clib_error_t *
285  unformat_input_t * input,
286  vlib_cli_command_t * cmd)
287 {
288  unformat_input_t _line_input, *line_input = &_line_input;
289  int i;
290 
291  if (unformat_user (input, unformat_line_input, line_input))
292  unformat_free (line_input);
293 
294  vlib_cli_output (vm, "%-28s%-16s%s", "Algo", "Type", "Handler");
295 
296  for (i = 0; i < VNET_CRYPTO_N_ASYNC_ALGS; i++)
299 
300  return 0;
301 }
302 
303 /* *INDENT-OFF* */
305 {
306  .path = "show crypto async handlers",
307  .short_help = "show crypto async handlers",
309 };
310 /* *INDENT-ON* */
311 
312 
313 static clib_error_t *
315  unformat_input_t * input,
316  vlib_cli_command_t * cmd)
317 {
319  u32 skip_master = vlib_num_workers () > 0;
321  unformat_input_t _line_input, *line_input = &_line_input;
322  int i;
323 
324  if (unformat_user (input, unformat_line_input, line_input))
325  unformat_free (line_input);
326 
327  vlib_cli_output (vm, "Crypto async dispatch mode: %s",
328  cm->dispatch_mode ==
330  "INTERRUPT");
331 
332  for (i = skip_master; i < tm->n_vlib_mains; i++)
333  {
335  vlib_get_main_by_index (i), cm->crypto_node_index);
336  if (state == VLIB_NODE_STATE_POLLING)
337  vlib_cli_output (vm, "threadId: %-6d POLLING", i);
338  if (state == VLIB_NODE_STATE_INTERRUPT)
339  vlib_cli_output (vm, "threadId: %-6d INTERRUPT", i);
340  if (state == VLIB_NODE_STATE_DISABLED)
341  vlib_cli_output (vm, "threadId: %-6d DISABLED", i);
342  }
343  return 0;
344 }
345 
346 /* *INDENT-OFF* */
348 {
349  .path = "show crypto async status",
350  .short_help = "show crypto async status",
352 };
353 /* *INDENT-ON* */
354 
355 static clib_error_t *
357  unformat_input_t * input,
358  vlib_cli_command_t * cmd)
359 {
360  unformat_input_t _line_input, *line_input = &_line_input;
362  int rc = 0;
363  char **args = 0, *s, **arg, *engine = 0;
364  int all = 0;
365  clib_error_t *error = 0;
366 
367  if (!unformat_user (input, unformat_line_input, line_input))
368  return 0;
369 
370  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
371  {
372  if (unformat (line_input, "all"))
373  all = 1;
374  else if (unformat (line_input, "%s", &s))
375  vec_add1 (args, s);
376  else
377  {
378  error = clib_error_return (0, "invalid params");
379  goto done;
380  }
381  }
382 
383  if ((vec_len (args) < 2 && !all) || (vec_len (args) == 0 && all))
384  {
385  error = clib_error_return (0, "missing cipher or engine!");
386  goto done;
387  }
388 
389  engine = vec_elt_at_index (args, vec_len (args) - 1)[0];
390  vec_del1 (args, vec_len (args) - 1);
391 
392  if (all)
393  {
394  char *key;
395  u8 *value;
396 
397  /* *INDENT-OFF* */
398  hash_foreach_mem (key, value, cm->async_alg_index_by_name,
399  ({
400  (void) value;
401  rc += vnet_crypto_set_async_handler2 (key, engine);
402  }));
403  /* *INDENT-ON* */
404 
405  if (rc)
406  vlib_cli_output (vm, "failed to set crypto engine!");
407  }
408  else
409  {
410  vec_foreach (arg, args)
411  {
412  rc = vnet_crypto_set_async_handler2 (arg[0], engine);
413  if (rc)
414  {
415  vlib_cli_output (vm, "failed to set engine %s for %s!",
416  engine, arg[0]);
417  }
418  }
419  }
420 
421 done:
422  vec_free (engine);
423  vec_foreach (arg, args) vec_free (arg[0]);
424  vec_free (args);
425  unformat_free (line_input);
426  return error;
427 }
428 
429 /* *INDENT-OFF* */
431 {
432  .path = "set crypto async handler",
433  .short_help = "set crypto async handler type [type2 type3 ...] engine",
435 };
436 /* *INDENT-ON* */
437 
438 static inline void
440 {
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.");
445 }
446 
447 static clib_error_t *
449  unformat_input_t * input,
450  vlib_cli_command_t * cmd)
451 {
454  return 0;
455 }
456 
457 static clib_error_t *
459  unformat_input_t * input,
460  vlib_cli_command_t * cmd)
461 {
464  return 0;
465 }
466 
467 /* *INDENT-OFF* */
469 {
470  .path = "set crypto async dispatch polling",
471  .short_help = "set crypto async dispatch polling|interrupt",
473 };
475 {
476  .path = "set crypto async dispatch interrupt",
477  .short_help = "set crypto async dispatch polling|interrupt",
479 };
480 /*
481  * fd.io coding-style-patch-verification: ON
482  *
483  * Local Variables:
484  * eval: (c-set-style "gnu")
485  * End:
486  */
vnet_crypto_engine_t
Definition: crypto.h:432
format_vnet_crypto_handlers
static u8 * format_vnet_crypto_handlers(u8 *s, va_list *args)
Definition: cli.c:103
vlib.h
vnet_crypto_async_alg_data_t
Definition: crypto.h:320
set_crypto_async_dispatch_interrupt_command
static vlib_cli_command_t set_crypto_async_dispatch_interrupt_command
(constructor) VLIB_CLI_COMMAND (set_crypto_async_dispatch_interrupt_command)
Definition: cli.c:474
vlib_num_workers
static u32 vlib_num_workers()
Definition: threads.h:354
unformat_user
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:989
crypto_op_class_type_t
crypto_op_class_type_t
Definition: crypto.h:235
format_vnet_crypto_async_op_type
format_function_t format_vnet_crypto_async_op_type
Definition: crypto.h:525
crypto.h
show_crypto_engines_command
static vlib_cli_command_t show_crypto_engines_command
(constructor) VLIB_CLI_COMMAND (show_crypto_engines_command)
Definition: cli.c:49
show_crypto_handlers_command_fn
static clib_error_t * show_crypto_handlers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:135
VNET_CRYPTO_ASYNC_OP_N_TYPES
@ VNET_CRYPTO_ASYNC_OP_N_TYPES
Definition: crypto.h:165
unformat_line_input
unformat_function_t unformat_line_input
Definition: format.h:275
set_crypto_handler_command
static vlib_cli_command_t set_crypto_handler_command
(constructor) VLIB_CLI_COMMAND (set_crypto_handler_command)
Definition: cli.c:245
vnet_crypto_main_t
Definition: crypto.h:451
vnet_crypto_async_alg_t
vnet_crypto_async_alg_t
Definition: crypto.h:168
clib_error_return
#define clib_error_return(e, args...)
Definition: error.h:99
vlib_cli_command_t::path
char * path
Definition: cli.h:96
set_crypto_async_dispatch_polling_command_fn
static clib_error_t * set_crypto_async_dispatch_polling_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:448
format_vnet_crypto_async_handlers
static u8 * format_vnet_crypto_async_handlers(u8 *s, va_list *args)
Definition: cli.c:255
VNET_CRYPTO_N_ASYNC_ALGS
@ VNET_CRYPTO_N_ASYNC_ALGS
Definition: crypto.h:179
first
static heap_elt_t * first(heap_header_t *h)
Definition: heap.c:59
VNET_CRYPTO_OP_N_TYPES
@ VNET_CRYPTO_OP_N_TYPES
Definition: crypto.h:70
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
state
vl_api_dhcp_client_state_t state
Definition: dhcp.api:201
vnet_crypto_async_alg_data_t::op_by_type
vnet_crypto_async_op_id_t op_by_type[VNET_CRYPTO_ASYNC_OP_N_TYPES]
Definition: crypto.h:323
CRYPTO_OP_SIMPLE
@ CRYPTO_OP_SIMPLE
Definition: crypto.h:237
show_crypto_async_status_command_fn
static clib_error_t * show_crypto_async_status_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:314
set_crypto_async_handler_command
static vlib_cli_command_t set_crypto_async_handler_command
(constructor) VLIB_CLI_COMMAND (set_crypto_async_handler_command)
Definition: cli.c:430
unformat_input_t
struct _unformat_input_t unformat_input_t
VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT
#define VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT
Definition: crypto.h:472
vnet_crypto_engine_t::desc
char * desc
Definition: crypto.h:435
h
h
Definition: flowhash_template.h:372
error
Definition: cJSON.c:88
key
typedef key
Definition: ipsec_types.api:88
vnet_crypto_alg_data_t
Definition: crypto.h:242
unformat
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
VNET_CRYPTO_ASYNC_DISPATCH_POLLING
#define VNET_CRYPTO_ASYNC_DISPATCH_POLLING
Definition: crypto.h:471
vlib_thread_main_t::n_vlib_mains
u32 n_vlib_mains
Definition: threads.h:283
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
unformat_free
static void unformat_free(unformat_input_t *i)
Definition: format.h:155
vnet_crypto_async_op_data_t::type
vnet_crypto_async_op_type_t type
Definition: crypto.h:315
vec_add1
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:606
vnet_crypto_set_async_dispatch_mode
void vnet_crypto_set_async_dispatch_mode(u8 mode)
Definition: crypto.c:608
vnet_crypto_op_data_t
Definition: crypto.h:305
vec_elt_at_index
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
Definition: vec_bootstrap.h:203
vnet_crypto_engine_t::enqueue_handlers
vnet_crypto_frame_enqueue_t * enqueue_handlers[VNET_CRYPTO_ASYNC_OP_N_IDS]
Definition: crypto.h:441
unformat_check_input
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:163
VNET_CRYPTO_N_ALGS
@ VNET_CRYPTO_N_ALGS
Definition: crypto.h:157
vnet_crypto_op_data_t::active_engine_index_simple
u32 active_engine_index_simple
Definition: crypto.h:309
vlib_node_state_t
vlib_node_state_t
Definition: node.h:239
format_vnet_crypto_engine_candidates
static u8 * format_vnet_crypto_engine_candidates(u8 *s, va_list *args)
Definition: cli.c:57
i
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:261
vnet_crypto_op_id_t
vnet_crypto_op_id_t
Definition: crypto.h:219
cm
vnet_feature_config_main_t * cm
Definition: nat44_ei_hairpinning.c:591
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
set_crypto_async_dispatch_polling_command
static vlib_cli_command_t set_crypto_async_dispatch_polling_command
(constructor) VLIB_CLI_COMMAND (set_crypto_async_dispatch_polling_command)
Definition: cli.c:468
show_crypto_async_handlers_command
static vlib_cli_command_t show_crypto_async_handlers_command
(constructor) VLIB_CLI_COMMAND (show_crypto_async_handlers_command)
Definition: cli.c:304
print_crypto_async_dispatch_warning
static void print_crypto_async_dispatch_warning()
Definition: cli.c:439
set_crypto_handler_command_fn
static clib_error_t * set_crypto_handler_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:164
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:716
set_crypto_async_dispatch_interrupt_command_fn
static clib_error_t * set_crypto_async_dispatch_interrupt_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:458
crypto_main
vnet_crypto_main_t crypto_main
Definition: crypto.c:20
id
u8 id[64]
Definition: dhcp.api:160
vnet_crypto_op_data_t::active_engine_index_chained
u32 active_engine_index_chained
Definition: crypto.h:310
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
vnet_crypto_op_data_t::type
vnet_crypto_op_type_t type
Definition: crypto.h:307
vnet_crypto_async_op_data_t
Definition: crypto.h:313
vnet_crypto_alg_data_t::op_by_type
vnet_crypto_op_id_t op_by_type[VNET_CRYPTO_OP_N_TYPES]
Definition: crypto.h:245
format
description fragment has unexpected format
Definition: map.api:433
format_get_indent
static u32 format_get_indent(u8 *s)
Definition: format.h:72
show_crypto_handlers_command
static vlib_cli_command_t show_crypto_handlers_command
(constructor) VLIB_CLI_COMMAND (show_crypto_handlers_command)
Definition: cli.c:155
u32
unsigned int u32
Definition: types.h:88
vlib_thread_main_t
Definition: threads.h:264
show_crypto_engines_command_fn
static clib_error_t * show_crypto_engines_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:21
vec_foreach
#define vec_foreach(var, vec)
Vector iterator.
Definition: vec_bootstrap.h:213
vlib_get_main_by_index
static vlib_main_t * vlib_get_main_by_index(u32 thread_index)
Definition: global_funcs.h:29
set_crypto_async_handler_command_fn
static clib_error_t * set_crypto_async_handler_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:356
vnet_crypto_set_async_handler2
int vnet_crypto_set_async_handler2(char *alg_name, char *engine)
Definition: crypto.c:509
value
u8 value
Definition: qos.api:54
format_vnet_crypto_async_alg
format_function_t format_vnet_crypto_async_alg
Definition: crypto.h:524
vnet_crypto_engine_t::dequeue_handlers
vnet_crypto_frame_dequeue_t * dequeue_handlers[VNET_CRYPTO_ASYNC_OP_N_IDS]
Definition: crypto.h:442
vnet_crypto_engine_t::ops_handlers
vnet_crypto_ops_handler_t * ops_handlers[VNET_CRYPTO_N_OP_IDS]
Definition: crypto.h:438
vlib_main_t
Definition: main.h:102
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
vnet_crypto_engine_t::priority
int priority
Definition: crypto.h:436
vnet_crypto_async_op_id_t
vnet_crypto_async_op_id_t
Definition: crypto.h:182
format_vnet_crypto_engine
format_function_t format_vnet_crypto_engine
Definition: crypto.h:517
vnet_crypto_engine_t::name
char * name
Definition: crypto.h:434
clib_warning
#define clib_warning(format, args...)
Definition: error.h:59
show_crypto_async_handlers_command_fn
static clib_error_t * show_crypto_async_handlers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:284
show_crypto_async_status_command
static vlib_cli_command_t show_crypto_async_status_command
(constructor) VLIB_CLI_COMMAND (show_crypto_async_status_command)
Definition: cli.c:347
format_vnet_crypto_alg
format_function_t format_vnet_crypto_alg
Definition: crypto.h:516
vnet_crypto_async_op_data_t::active_engine_index_async
u32 active_engine_index_async
Definition: crypto.h:317
hash_foreach_mem
#define hash_foreach_mem(key_var, value_var, h, body)
Definition: hash.h:460
vlib_cli_command_t
Definition: cli.h:92
CRYPTO_OP_BOTH
@ CRYPTO_OP_BOTH
Definition: crypto.h:239
vnet_crypto_alg_t
vnet_crypto_alg_t
Definition: crypto.h:145
vlib_get_thread_main
static vlib_thread_main_t * vlib_get_thread_main()
Definition: global_funcs.h:56
CRYPTO_OP_CHAINED
@ CRYPTO_OP_CHAINED
Definition: crypto.h:238
vnet_crypto_set_handler2
int vnet_crypto_set_handler2(char *alg_name, char *engine, crypto_op_class_type_t oct)
Definition: crypto.c:156
vec_del1
#define vec_del1(v, i)
Delete the element at index I.
Definition: vec.h:896
format_white_space
u8 * format_white_space(u8 *s, va_list *va)
Definition: std-formats.c:129
vlib_node_get_state
static vlib_node_state_t vlib_node_get_state(vlib_main_t *vm, u32 node_index)
Get node dispatch state.
Definition: node_funcs.h:219
UNFORMAT_END_OF_INPUT
#define UNFORMAT_END_OF_INPUT
Definition: format.h:137
format_vnet_crypto_op_type
format_function_t format_vnet_crypto_op_type
Definition: crypto.h:519
vnet_crypto_engine_t::chained_ops_handlers
vnet_crypto_chained_ops_handler_t * chained_ops_handlers[VNET_CRYPTO_N_OP_IDS]
Definition: crypto.h:440