summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/ipsec/ipsec.api12
-rw-r--r--src/vnet/ipsec/ipsec_api.c15
2 files changed, 26 insertions, 1 deletions
diff --git a/src/vnet/ipsec/ipsec.api b/src/vnet/ipsec/ipsec.api
index 16d210f69b9..52a16ede1aa 100644
--- a/src/vnet/ipsec/ipsec.api
+++ b/src/vnet/ipsec/ipsec.api
@@ -535,6 +535,18 @@ autoreply define ipsec_select_backend {
u8 index;
};
+
+/** \brief IPsec Set Async mode
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param async_enable - ipsec async mode on or off
+*/
+autoreply define ipsec_set_async_mode {
+ u32 client_index;
+ u32 context;
+ bool async_enable;
+};
+
/*
* Local Variables:
* eval: (c-set-style "gnu")
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index 667d9b2fd11..f623cced0c7 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -71,7 +71,8 @@ _(IPSEC_SELECT_BACKEND, ipsec_select_backend) \
_(IPSEC_BACKEND_DUMP, ipsec_backend_dump) \
_(IPSEC_TUNNEL_PROTECT_UPDATE, ipsec_tunnel_protect_update) \
_(IPSEC_TUNNEL_PROTECT_DEL, ipsec_tunnel_protect_del) \
-_(IPSEC_TUNNEL_PROTECT_DUMP, ipsec_tunnel_protect_dump)
+_(IPSEC_TUNNEL_PROTECT_DUMP, ipsec_tunnel_protect_dump) \
+_(IPSEC_SET_ASYNC_MODE, ipsec_set_async_mode)
static void
vl_api_ipsec_spd_add_del_t_handler (vl_api_ipsec_spd_add_del_t * mp)
@@ -1012,6 +1013,18 @@ done:
REPLY_MACRO (VL_API_IPSEC_SELECT_BACKEND_REPLY);
}
+static void
+vl_api_ipsec_set_async_mode_t_handler (vl_api_ipsec_set_async_mode_t * mp)
+{
+ vl_api_ipsec_set_async_mode_reply_t *rmp;
+ int rv = 0;
+
+ vnet_crypto_request_async_mode (mp->async_enable);
+ ipsec_set_async_mode (mp->async_enable);
+
+ REPLY_MACRO (VL_API_IPSEC_SET_ASYNC_MODE_REPLY);
+}
+
/*
* ipsec_api_hookup
* Add vpe's API message handlers to the table.