Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
IPSEC; dpdk backend for tunnel interface encryption
[vpp.git]
/
src
/
vnet
/
ipsec
/
ipsec_cli.c
diff --git
a/src/vnet/ipsec/ipsec_cli.c
b/src/vnet/ipsec/ipsec_cli.c
index
16d9048
..
4691214
100644
(file)
--- a/
src/vnet/ipsec/ipsec_cli.c
+++ b/
src/vnet/ipsec/ipsec_cli.c
@@
-661,17
+661,16
@@
ipsec_select_backend_command_fn (vlib_main_t * vm,
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
unformat_input_t * input,
vlib_cli_command_t * cmd)
{
- u
32 backend_index
;
+ u
nformat_input_t _line_input, *line_input = &_line_input
;
ipsec_main_t *im = &ipsec_main;
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;
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;