aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-09-18 16:15:47 -0700
committerFlorin Coras <florin.coras@gmail.com>2020-09-18 23:15:41 +0000
commit7360e3d78d6a84eff1562aaca0f7a6ee6958ce9c (patch)
tree6f0300495a5c0f0c5a01066e11099c6ea321b9ce
parent1f799bc3cb7a3826395e544cafe587174393e2f0 (diff)
session: grab worker barrier for sapi msgs
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7cdbcfeb6f77a720e190daf9fe555320e586bba8
-rw-r--r--src/vnet/session/session_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 89a30d2626d..bda98b7417c 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1534,6 +1534,7 @@ static clib_error_t *
sapi_sock_read_ready (clib_file_t * cf)
{
app_ns_api_handle_t *handle = (app_ns_api_handle_t *) & cf->private_data;
+ vlib_main_t *vm = vlib_get_main ();
app_sapi_msg_t msg = { 0 };
app_namespace_t *app_ns;
clib_error_t *err = 0;
@@ -1554,6 +1555,8 @@ sapi_sock_read_ready (clib_file_t * cf)
handle = (app_ns_api_handle_t *) & cs->private_data;
+ vlib_worker_thread_barrier_sync (vm);
+
switch (msg.type)
{
case APP_SAPI_MSG_TYPE_ATTACH:
@@ -1568,6 +1571,8 @@ sapi_sock_read_ready (clib_file_t * cf)
break;
}
+ vlib_worker_thread_barrier_release (vm);
+
error:
return 0;
}