191f17dc7SDamjan Marion/*
291f17dc7SDamjan Marion * Copyright (c) 2019 Cisco and/or its affiliates.
391f17dc7SDamjan Marion * Licensed under the Apache License, Version 2.0 (the "License");
491f17dc7SDamjan Marion * you may not use this file except in compliance with the License.
591f17dc7SDamjan Marion * You may obtain a copy of the License at:
691f17dc7SDamjan Marion *
791f17dc7SDamjan Marion *     http://www.apache.org/licenses/LICENSE-2.0
891f17dc7SDamjan Marion *
991f17dc7SDamjan Marion * Unless required by applicable law or agreed to in writing, software
1091f17dc7SDamjan Marion * distributed under the License is distributed on an "AS IS" BASIS,
1191f17dc7SDamjan Marion * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1291f17dc7SDamjan Marion * See the License for the specific language governing permissions and
1391f17dc7SDamjan Marion * limitations under the License.
1491f17dc7SDamjan Marion */
1591f17dc7SDamjan Marion
1691f17dc7SDamjan Marion#include <stdbool.h>
1791f17dc7SDamjan Marion#include <vlib/vlib.h>
1891f17dc7SDamjan Marion#include <vnet/crypto/crypto.h>
1991f17dc7SDamjan Marion
2091f17dc7SDamjan Marionstatic clib_error_t *
2191f17dc7SDamjan Marionshow_crypto_engines_command_fn (vlib_main_t * vm,
2291f17dc7SDamjan Marion				unformat_input_t * input,
2391f17dc7SDamjan Marion				vlib_cli_command_t * cmd)
2491f17dc7SDamjan Marion{
2591f17dc7SDamjan Marion  unformat_input_t _line_input, *line_input = &_line_input;
2691f17dc7SDamjan Marion  vnet_crypto_main_t *cm = &crypto_main;
2791f17dc7SDamjan Marion  vnet_crypto_engine_t *p;
2891f17dc7SDamjan Marion
2991f17dc7SDamjan Marion  if (unformat_user (input, unformat_line_input, line_input))
3091f17dc7SDamjan Marion    unformat_free (line_input);
3191f17dc7SDamjan Marion
3291f17dc7SDamjan Marion  if (vec_len (cm->engines) == 0)
3391f17dc7SDamjan Marion    {
3491f17dc7SDamjan Marion      vlib_cli_output (vm, "No crypto engines registered");
3591f17dc7SDamjan Marion      return 0;
3691f17dc7SDamjan Marion    }
3791f17dc7SDamjan Marion
3891f17dc7SDamjan Marion  vlib_cli_output (vm, "%-20s%-8s%s", "Name", "Prio", "Description");
3991f17dc7SDamjan Marion  /* *INDENT-OFF* */
4091f17dc7SDamjan Marion  vec_foreach (p, cm->engines)
4191f17dc7SDamjan Marion    {
4291f17dc7SDamjan Marion      vlib_cli_output (vm, "%-20s%-8u%s", p->name, p->priority, p->desc);
4391f17dc7SDamjan Marion    }
4491f17dc7SDamjan Marion  /* *INDENT-ON* */
4591f17dc7SDamjan Marion  return 0;
4691f17dc7SDamjan Marion}
4791f17dc7SDamjan Marion
4891f17dc7SDamjan Marion/* *INDENT-OFF* */
4991f17dc7SDamjan MarionVLIB_CLI_COMMAND (show_crypto_engines_command, static) =
5091f17dc7SDamjan Marion{
5191f17dc7SDamjan Marion  .path = "show crypto engines",
5291f17dc7SDamjan Marion  .short_help = "show crypto engines",
5391f17dc7SDamjan Marion  .function = show_crypto_engines_command_fn,
5491f17dc7SDamjan Marion};
5591f17dc7SDamjan Marion
561307b2ebSFilip Tehlarstatic u8 *
571307b2ebSFilip Tehlarformat_vnet_crypto_engine_candidates (u8 * s, va_list * args)
581307b2ebSFilip Tehlar{
591307b2ebSFilip Tehlar  vnet_crypto_engine_t *e;
601307b2ebSFilip Tehlar  vnet_crypto_main_t *cm = &crypto_main;
61f539578bSFan Zhang  u32 id = va_arg (*args, u32);
621307b2ebSFilip Tehlar  u32 ei = va_arg (*args, u32);
631307b2ebSFilip Tehlar  int is_chained = va_arg (*args, int);
64f539578bSFan Zhang  int is_async = va_arg (*args, int);
651307b2ebSFilip Tehlar
66f539578bSFan Zhang  if (is_async)
671307b2ebSFilip Tehlar    {
68f539578bSFan Zhang      vec_foreach (e, cm->engines)
69f539578bSFan Zhang	{
70f539578bSFan Zhang	  if (e->enqueue_handlers[id] && e->dequeue_handlers[id])
71f539578bSFan Zhang	    {
72f539578bSFan Zhang	      s = format (s, "%U", format_vnet_crypto_engine, e - cm->engines);
73f539578bSFan Zhang	      if (ei == e - cm->engines)
74f539578bSFan Zhang		s = format (s, "%c ", '*');
75f539578bSFan Zhang	      else
76f539578bSFan Zhang		s = format (s, " ");
77f539578bSFan Zhang	    }
78f539578bSFan Zhang	}
79f539578bSFan Zhang
80f539578bSFan Zhang      return s;
81f539578bSFan Zhang    }
82f539578bSFan Zhang  else
83f539578bSFan Zhang    {
84f539578bSFan Zhang      vec_foreach (e, cm->engines)
85f539578bSFan Zhang	{
86f539578bSFan Zhang	  void * h = is_chained ? (void *) e->chained_ops_handlers[id]
87f539578bSFan Zhang	    : (void *) e->ops_handlers[id];
88f539578bSFan Zhang
89f539578bSFan Zhang	  if (h)
90f539578bSFan Zhang	    {
91f539578bSFan Zhang	      s = format (s, "%U", format_vnet_crypto_engine, e - cm->engines);
92f539578bSFan Zhang	      if (ei == e - cm->engines)
93f539578bSFan Zhang		s = format (s, "%c ", '*');
94f539578bSFan Zhang	      else
95f539578bSFan Zhang		s = format (s, " ");
96f539578bSFan Zhang	    }
97f539578bSFan Zhang	}
98f539578bSFan Zhang      return s;
991307b2ebSFilip Tehlar    }
1001307b2ebSFilip Tehlar}
1011307b2ebSFilip Tehlar
102060bfb98SDamjan Marionstatic u8 *
103060bfb98SDamjan Marionformat_vnet_crypto_handlers (u8 * s, va_list * args)
10491f17dc7SDamjan Marion{
105060bfb98SDamjan Marion  vnet_crypto_alg_t alg = va_arg (*args, vnet_crypto_alg_t);
10691f17dc7SDamjan Marion  vnet_crypto_main_t *cm = &crypto_main;
107060bfb98SDamjan Marion  vnet_crypto_alg_data_t *d = vec_elt_at_index (cm->algs, alg);
108060bfb98SDamjan Marion  u32 indent = format_get_indent (s);
109060bfb98SDamjan Marion  int i, first = 1;
11091f17dc7SDamjan Marion
111060bfb98SDamjan Marion  for (i = 0; i < VNET_CRYPTO_OP_N_TYPES; i++)
11291f17dc7SDamjan Marion    {
113060bfb98SDamjan Marion      vnet_crypto_op_data_t *od;
114060bfb98SDamjan Marion      vnet_crypto_op_id_t id = d->op_by_type[i];
115060bfb98SDamjan Marion
116060bfb98SDamjan Marion      if (id == 0)
117060bfb98SDamjan Marion	continue;
118060bfb98SDamjan Marion
119b15d796dSLijian Zhang      od = cm->opt_data + id;
120060bfb98SDamjan Marion      if (first == 0)
121060bfb98SDamjan Marion        s = format (s, "\n%U", format_white_space, indent);
1221307b2ebSFilip Tehlar      s = format (s, "%-16U", format_vnet_crypto_op_type, od->type);
1231307b2ebSFilip Tehlar
1241307b2ebSFilip Tehlar      s = format (s, "%-28U", format_vnet_crypto_engine_candidates, id,
125f539578bSFan Zhang          od->active_engine_index_simple, 0, 0);
1261307b2ebSFilip Tehlar      s = format (s, "%U", format_vnet_crypto_engine_candidates, id,
127f539578bSFan Zhang          od->active_engine_index_chained, 1, 0);
128060bfb98SDamjan Marion      first = 0;
12991f17dc7SDamjan Marion    }
130060bfb98SDamjan Marion  return s;
131060bfb98SDamjan Marion}
132060bfb98SDamjan Marion
133060bfb98SDamjan Marion
134060bfb98SDamjan Marionstatic clib_error_t *
135060bfb98SDamjan Marionshow_crypto_handlers_command_fn (vlib_main_t * vm,
136060bfb98SDamjan Marion			unformat_input_t * input, vlib_cli_command_t * cmd)
137060bfb98SDamjan Marion{
138060bfb98SDamjan Marion  unformat_input_t _line_input, *line_input = &_line_input;
139060bfb98SDamjan Marion  int i;
140060bfb98SDamjan Marion
141060bfb98SDamjan Marion  if (unformat_user (input, unformat_line_input, line_input))
142060bfb98SDamjan Marion    unformat_free (line_input);
143060bfb98SDamjan Marion
1441307b2ebSFilip Tehlar  vlib_cli_output (vm, "%-16s%-16s%-28s%s", "Algo", "Type", "Simple",
1451307b2ebSFilip Tehlar      "Chained");
146060bfb98SDamjan Marion
147060bfb98SDamjan Marion  for (i = 0; i < VNET_CRYPTO_N_ALGS; i++)
1481307b2ebSFilip Tehlar    vlib_cli_output (vm, "%-16U%U", format_vnet_crypto_alg, i,
149060bfb98SDamjan Marion		     format_vnet_crypto_handlers, i);
150060bfb98SDamjan Marion
15191f17dc7SDamjan Marion  return 0;
15291f17dc7SDamjan Marion}
15391f17dc7SDamjan Marion
15491f17dc7SDamjan Marion/* *INDENT-OFF* */
15591f17dc7SDamjan MarionVLIB_CLI_COMMAND (show_crypto_handlers_command, static) =
15691f17dc7SDamjan Marion{
15791f17dc7SDamjan Marion  .path = "show crypto handlers",
15891f17dc7SDamjan Marion  .short_help = "show crypto handlers",
15991f17dc7SDamjan Marion  .function = show_crypto_handlers_command_fn,
16091f17dc7SDamjan Marion};
16191f17dc7SDamjan Marion/* *INDENT-ON* */
16291f17dc7SDamjan Marion
1631469d54fSFilip Tehlarstatic clib_error_t *
1641469d54fSFilip Tehlarset_crypto_handler_command_fn (vlib_main_t * vm,
1651469d54fSFilip Tehlar			       unformat_input_t * input,
1661469d54fSFilip Tehlar			       vlib_cli_command_t * cmd)
1671469d54fSFilip Tehlar{
1681469d54fSFilip Tehlar  unformat_input_t _line_input, *line_input = &_line_input;
1691469d54fSFilip Tehlar  vnet_crypto_main_t *cm = &crypto_main;
1701469d54fSFilip Tehlar  int rc = 0;
1711469d54fSFilip Tehlar  char **args = 0, *s, **arg, *engine = 0;
1721469d54fSFilip Tehlar  int all = 0;
1731469d54fSFilip Tehlar  clib_error_t *error = 0;
174efcad1a9SFilip Tehlar  crypto_op_class_type_t oct = CRYPTO_OP_BOTH;
1751469d54fSFilip Tehlar
1761469d54fSFilip Tehlar  if (!unformat_user (input, unformat_line_input, line_input))
1771469d54fSFilip Tehlar    return 0;
1781469d54fSFilip Tehlar
1791469d54fSFilip Tehlar  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
1801469d54fSFilip Tehlar    {
1811469d54fSFilip Tehlar      if (unformat (line_input, "all"))
1821469d54fSFilip Tehlar	all = 1;
183efcad1a9SFilip Tehlar      else if (unformat (line_input, "simple"))
184efcad1a9SFilip Tehlar	oct = CRYPTO_OP_SIMPLE;
185efcad1a9SFilip Tehlar      else if (unformat (line_input, "chained"))
186efcad1a9SFilip Tehlar	oct = CRYPTO_OP_CHAINED;
187efcad1a9SFilip Tehlar      else if (unformat (line_input, "both"))
188efcad1a9SFilip Tehlar	oct = CRYPTO_OP_BOTH;
1891469d54fSFilip Tehlar      else if (unformat (line_input, "%s", &s))
1901469d54fSFilip Tehlar	vec_add1 (args, s);
1911469d54fSFilip Tehlar      else
1921469d54fSFilip Tehlar	{
1931469d54fSFilip Tehlar	  error = clib_error_return (0, "invalid params");
1941469d54fSFilip Tehlar	  goto done;
1951469d54fSFilip Tehlar	}
1961469d54fSFilip Tehlar    }
1971469d54fSFilip Tehlar
1981469d54fSFilip Tehlar  if ((vec_len (args) < 2 && !all) || (vec_len (args) == 0 && all))
1991469d54fSFilip Tehlar    {
2001469d54fSFilip Tehlar      error = clib_error_return (0, "missing cipher or engine!");
2011469d54fSFilip Tehlar      goto done;
2021469d54fSFilip Tehlar    }
2031469d54fSFilip Tehlar
2041469d54fSFilip Tehlar  engine = vec_elt_at_index (args, vec_len (args) - 1)[0];
2051469d54fSFilip Tehlar  vec_del1 (args, vec_len (args) - 1);
2061469d54fSFilip Tehlar
2071469d54fSFilip Tehlar  if (all)
2081469d54fSFilip Tehlar    {
2091469d54fSFilip Tehlar      char *key;
2101469d54fSFilip Tehlar      u8 *value;
2111469d54fSFilip Tehlar
2121469d54fSFilip Tehlar      /* *INDENT-OFF* */
213060bfb98SDamjan Marion      hash_foreach_mem (key, value, cm->alg_index_by_name,
2141469d54fSFilip Tehlar      ({
2151469d54fSFilip Tehlar        (void) value;
216efcad1a9SFilip Tehlar        rc += vnet_crypto_set_handler2 (key, engine, oct);
2171469d54fSFilip Tehlar      }));
2181469d54fSFilip Tehlar      /* *INDENT-ON* */
2191469d54fSFilip Tehlar
2201469d54fSFilip Tehlar      if (rc)
2211469d54fSFilip Tehlar	vlib_cli_output (vm, "failed to set crypto engine!");
2221469d54fSFilip Tehlar    }
2231469d54fSFilip Tehlar  else
2241469d54fSFilip Tehlar    {
2251469d54fSFilip Tehlar      vec_foreach (arg, args)
2261469d54fSFilip Tehlar      {
227efcad1a9SFilip Tehlar	rc = vnet_crypto_set_handler2 (arg[0], engine, oct);
2281469d54fSFilip Tehlar	if (rc)
2291469d54fSFilip Tehlar	  {
2301469d54fSFilip Tehlar	    vlib_cli_output (vm, "failed to set engine %s for %s!",
2311469d54fSFilip Tehlar			     engine, arg[0]);
2321469d54fSFilip Tehlar	  }
2331469d54fSFilip Tehlar      }
2341469d54fSFilip Tehlar    }
2351469d54fSFilip Tehlar
2361469d54fSFilip Tehlardone:
2371469d54fSFilip Tehlar  vec_free (engine);
2381469d54fSFilip Tehlar  vec_foreach (arg, args) vec_free (arg[0]);
2391469d54fSFilip Tehlar  vec_free (args);
2401469d54fSFilip Tehlar  unformat_free (line_input);
2411469d54fSFilip Tehlar  return error;
2421469d54fSFilip Tehlar}
2431469d54fSFilip Tehlar
2441469d54fSFilip Tehlar/* *INDENT-OFF* */
2451469d54fSFilip TehlarVLIB_CLI_COMMAND (set_crypto_handler_command, static) =
2461469d54fSFilip Tehlar{
2471469d54fSFilip Tehlar  .path = "set crypto handler",
248efcad1a9SFilip Tehlar  .short_help = "set crypto handler cipher [cipher2 cipher3 ...] engine"
249efcad1a9SFilip Tehlar    " [simple|chained]",
2501469d54fSFilip Tehlar  .function = set_crypto_handler_command_fn,
2511469d54fSFilip Tehlar};
2521469d54fSFilip Tehlar/* *INDENT-ON* */
2531469d54fSFilip Tehlar
254f539578bSFan Zhangstatic u8 *
255f539578bSFan Zhangformat_vnet_crypto_async_handlers (u8 * s, va_list * args)
256f539578bSFan Zhang{
257f539578bSFan Zhang  vnet_crypto_async_alg_t alg = va_arg (*args, vnet_crypto_async_alg_t);
258f539578bSFan Zhang  vnet_crypto_main_t *cm = &crypto_main;
259f539578bSFan Zhang  vnet_crypto_async_alg_data_t *d = vec_elt_at_index (cm->async_algs, alg);
260f539578bSFan Zhang  u32 indent = format_get_indent (s);
261f539578bSFan Zhang  int i, first = 1;
262f539578bSFan Zhang
263f539578bSFan Zhang  for (i = 0; i < VNET_CRYPTO_ASYNC_OP_N_TYPES; i++)
264f539578bSFan Zhang    {
265f539578bSFan Zhang      vnet_crypto_async_op_data_t *od;
266f539578bSFan Zhang      vnet_crypto_async_op_id_t id = d->op_by_type[i];
267f539578bSFan Zhang
268f539578bSFan Zhang      if (id == 0)
269f539578bSFan Zhang	continue;
270f539578bSFan Zhang
271f539578bSFan Zhang      od = cm->async_opt_data + id;
272f539578bSFan Zhang      if (first == 0)
273f539578bSFan Zhang	s = format (s, "\n%U", format_white_space, indent);
274f539578bSFan Zhang      s = format (s, "%-16U", format_vnet_crypto_async_op_type, od->type);
275f539578bSFan Zhang
276f539578bSFan Zhang      s = format (s, "%U", format_vnet_crypto_engine_candidates, id,
277f539578bSFan Zhang		  od->active_engine_index_async, 0, 1);
278f539578bSFan Zhang      first = 0;
279f539578bSFan Zhang    }
280f539578bSFan Zhang  return s;
281f539578bSFan Zhang}
282f539578bSFan Zhang
283f539578bSFan Zhangstatic clib_error_t *
284f539578bSFan Zhangshow_crypto_async_handlers_command_fn (vlib_main_t * vm,
285f539578bSFan Zhang				       unformat_input_t * input,
286f539578bSFan Zhang				       vlib_cli_command_t * cmd)
287f539578bSFan Zhang{
288f539578bSFan Zhang  unformat_input_t _line_input, *line_input = &_line_input;
289f539578bSFan Zhang  int i;
290f539578bSFan Zhang
291f539578bSFan Zhang  if (unformat_user (input, unformat_line_input, line_input))
292f539578bSFan Zhang    unformat_free (line_input);
293f539578bSFan Zhang
294f539578bSFan Zhang  vlib_cli_output (vm, "%-28s%-16s%s", "Algo", "Type", "Handler");
295f539578bSFan Zhang
296f539578bSFan Zhang  for (i = 0; i < VNET_CRYPTO_N_ASYNC_ALGS; i++)
297f539578bSFan Zhang    vlib_cli_output (vm, "%-28U%U", format_vnet_crypto_async_alg, i,
298f539578bSFan Zhang		     format_vnet_crypto_async_handlers, i);
299f539578bSFan Zhang
300f539578bSFan Zhang  return 0;
301f539578bSFan Zhang}
302f539578bSFan Zhang
303f539578bSFan Zhang/* *INDENT-OFF* */
304f539578bSFan ZhangVLIB_CLI_COMMAND (show_crypto_async_handlers_command, static) =
305f539578bSFan Zhang{
306f539578bSFan Zhang  .path = "show crypto async handlers",
307f539578bSFan Zhang  .short_help = "show crypto async handlers",
308f539578bSFan Zhang  .function = show_crypto_async_handlers_command_fn,
309f539578bSFan Zhang};
310f539578bSFan Zhang/* *INDENT-ON* */
311f539578bSFan Zhang
312f539578bSFan Zhang
313f539578bSFan Zhangstatic clib_error_t *
314f539578bSFan Zhangset_crypto_async_handler_command_fn (vlib_main_t * vm,
315f539578bSFan Zhang				     unformat_input_t * input,
316f539578bSFan Zhang				     vlib_cli_command_t * cmd)
317f539578bSFan Zhang{
318f539578bSFan Zhang  unformat_input_t _line_input, *line_input = &_line_input;
319f539578bSFan Zhang  vnet_crypto_main_t *cm = &crypto_main;
320f539578bSFan Zhang  int rc = 0;
321f539578bSFan Zhang  char **args = 0, *s, **arg, *engine = 0;
322f539578bSFan Zhang  int all = 0;
323f539578bSFan Zhang  clib_error_t *error = 0;
324f539578bSFan Zhang
325f539578bSFan Zhang  if (!unformat_user (input, unformat_line_input, line_input))
326f539578bSFan Zhang    return 0;
327f539578bSFan Zhang
328f539578bSFan Zhang  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
329f539578bSFan Zhang    {
330f539578bSFan Zhang      if (unformat (line_input, "all"))
331f539578bSFan Zhang	all = 1;
332f539578bSFan Zhang      else if (unformat (line_input, "%s", &s))
333f539578bSFan Zhang	vec_add1 (args, s);
334f539578bSFan Zhang      else
335f539578bSFan Zhang	{
336f539578bSFan Zhang	  error = clib_error_return (0, "invalid params");
337f539578bSFan Zhang	  goto done;
338f539578bSFan Zhang	}
339f539578bSFan Zhang    }
340f539578bSFan Zhang
341f539578bSFan Zhang  if ((vec_len (args) < 2 && !all) || (vec_len (args) == 0 && all))
342f539578bSFan Zhang    {
343f539578bSFan Zhang      error = clib_error_return (0, "missing cipher or engine!");
344f539578bSFan Zhang      goto done;
345f539578bSFan Zhang    }
346f539578bSFan Zhang
347f539578bSFan Zhang  engine = vec_elt_at_index (args, vec_len (args) - 1)[0];
348f539578bSFan Zhang  vec_del1 (args, vec_len (args) - 1);
349f539578bSFan Zhang
350f539578bSFan Zhang  if (all)
351f539578bSFan Zhang    {
352f539578bSFan Zhang      char *key;
353f539578bSFan Zhang      u8 *value;
354f539578bSFan Zhang
355f539578bSFan Zhang      /* *INDENT-OFF* */
356f539578bSFan Zhang      hash_foreach_mem (key, value, cm->async_alg_index_by_name,
357f539578bSFan Zhang      ({
358f539578bSFan Zhang        (void) value;
359f539578bSFan Zhang        rc += vnet_crypto_set_async_handler2 (key, engine);
360f539578bSFan Zhang      }));
361f539578bSFan Zhang      /* *INDENT-ON* */
362f539578bSFan Zhang
363f539578bSFan Zhang      if (rc)
364f539578bSFan Zhang	vlib_cli_output (vm, "failed to set crypto engine!");
365f539578bSFan Zhang    }
366f539578bSFan Zhang  else
367f539578bSFan Zhang    {
368f539578bSFan Zhang      vec_foreach (arg, args)
369f539578bSFan Zhang      {
370f539578bSFan Zhang	rc = vnet_crypto_set_async_handler2 (arg[0], engine);
371f539578bSFan Zhang	if (rc)
372f539578bSFan Zhang	  {
373f539578bSFan Zhang	    vlib_cli_output (vm, "failed to set engine %s for %s!",
374f539578bSFan Zhang			     engine, arg[0]);
375f539578bSFan Zhang	  }
376f539578bSFan Zhang      }
377f539578bSFan Zhang    }
378f539578bSFan Zhang
379f539578bSFan Zhangdone:
380f539578bSFan Zhang  vec_free (engine);
381f539578bSFan Zhang  vec_foreach (arg, args) vec_free (arg[0]);
382f539578bSFan Zhang  vec_free (args);
383f539578bSFan Zhang  unformat_free (line_input);
384f539578bSFan Zhang  return error;
385f539578bSFan Zhang}
386f539578bSFan Zhang
387f539578bSFan Zhang/* *INDENT-OFF* */
388f539578bSFan ZhangVLIB_CLI_COMMAND (set_crypto_async_handler_command, static) =
389f539578bSFan Zhang{
390f539578bSFan Zhang  .path = "set crypto async handler",
391f539578bSFan Zhang  .short_help = "set crypto async handler type [type2 type3 ...] engine",
392f539578bSFan Zhang  .function = set_crypto_async_handler_command_fn,
393f539578bSFan Zhang};
394f539578bSFan Zhang/* *INDENT-ON* */
395f539578bSFan Zhang
39691f17dc7SDamjan Marion/*
39791f17dc7SDamjan Marion * fd.io coding-style-patch-verification: ON
39891f17dc7SDamjan Marion *
39991f17dc7SDamjan Marion * Local Variables:
40091f17dc7SDamjan Marion * eval: (c-set-style "gnu")
40191f17dc7SDamjan Marion * End:
40291f17dc7SDamjan Marion */
403