summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-07-15 07:48:27 -0700
committerDave Barach <openvpp@barachs.net>2019-07-17 12:19:01 +0000
commit0dfbce6b76c40976beca671da57c773c6e8944b9 (patch)
treef0d9cca8fb4eb1f3e08b5e09b175c6ddcce18e9c
parentb11e4aefbee765c0c09bbe1386ec78920f9162fd (diff)
session: grab mq lock until ctrl event is enqueued
Type: fix Change-Id: I26a6af7f92316f7a8a5309047b3b3605b87ca327 Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/vnet/session/application_interface.h3
1 files changed, 1 insertions, 2 deletions
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);
}
/**