summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_cli.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-23 20:57:55 -0400
committerNeale Ranns <nranns@cisco.com>2019-04-24 18:35:02 -0400
commit873b9ed405f291a954a8f45a0bba6b136d6ff19f (patch)
tree4c812bfdca2aeea94998ea8e0bdb726e37e74c49 /src/vnet/ipsec/ipsec_cli.c
parent3d18a191aaf31ef8b1524ab80fed22a304adf75d (diff)
IPSEC; dpdk backend for tunnel interface encryption (VPP-1662)v19.04.1-rc0
Change-Id: Ide2a9df18db371c8428855d7f12f246006d7c04c Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec_cli.c')
-rw-r--r--src/vnet/ipsec/ipsec_cli.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index 096060865e9..b97fb02b66d 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -658,17 +658,16 @@ ipsec_select_backend_command_fn (vlib_main_t * vm,
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
- u32 backend_index;
+ unformat_input_t _line_input, *line_input = &_line_input;
ipsec_main_t *im = &ipsec_main;
+ clib_error_t *error;
+ u32 backend_index;
- if (pool_elts (im->sad) > 0)
- {
- return clib_error_return (0,
- "Cannot change IPsec backend, while %u SA entries are configured",
- pool_elts (im->sad));
- }
+ error = ipsec_rsc_in_use (im);
+
+ if (error)
+ return error;
- unformat_input_t _line_input, *line_input = &_line_input;
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;