From 0dfbce6b76c40976beca671da57c773c6e8944b9 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 15 Jul 2019 07:48:27 -0700 Subject: session: grab mq lock until ctrl event is enqueued Type: fix Change-Id: I26a6af7f92316f7a8a5309047b3b3605b87ca327 Signed-off-by: Florin Coras --- src/vnet/session/application_interface.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/vnet/session') diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h index 895fc64a7d2..3a1c9b55738 100644 --- a/src/vnet/session/application_interface.h +++ b/src/vnet/session/application_interface.h @@ -385,7 +385,6 @@ app_alloc_ctrl_evt_to_vpp (svm_msg_q_t * mq, app_session_evt_t * app_evt, svm_msg_q_lock_and_alloc_msg_w_ring (mq, SESSION_MQ_CTRL_EVT_RING, SVM_Q_WAIT, &app_evt->msg); - svm_msg_q_unlock (mq); app_evt->evt = svm_msg_q_msg_data (mq, &app_evt->msg); clib_memset (app_evt->evt, 0, sizeof (*app_evt->evt)); app_evt->evt->event_type = evt_type; @@ -394,7 +393,7 @@ app_alloc_ctrl_evt_to_vpp (svm_msg_q_t * mq, app_session_evt_t * app_evt, static inline void app_send_ctrl_evt_to_vpp (svm_msg_q_t * mq, app_session_evt_t * app_evt) { - svm_msg_q_add (mq, &app_evt->msg, SVM_Q_WAIT); + svm_msg_q_add_and_unlock (mq, &app_evt->msg); } /** -- cgit 1.2.3-korg