aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-04-19 18:57:24 -0700
committerDave Barach <openvpp@barachs.net>2022-04-21 16:48:15 +0000
commit80d100cd59015d91c4f0abfaf07b6876088ecbf1 (patch)
tree5b0d949fcf012b359c0af8b4371afbe6d10c7a29 /src/vnet/session/session.c
parent5297447bd64ab253ab3ab3e144605dd39f995f12 (diff)
session svm: fix mq producer wait on q and ring
Make sure producer drops lock when it waits for empty ring slot. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id77d54ee8c01bed20c9eaf5ad372ed4b1e9fa712
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 256760079ee..d791c463f90 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -36,8 +36,7 @@ session_send_evt_to_thread (void *data, void *args, u32 thread_index,
mq = wrk->vpp_event_queue;
if (PREDICT_FALSE (svm_msg_q_lock (mq)))
return -1;
- if (PREDICT_FALSE (svm_msg_q_is_full (mq)
- || svm_msg_q_ring_is_full (mq, SESSION_MQ_IO_EVT_RING)))
+ if (PREDICT_FALSE (svm_msg_q_or_ring_is_full (mq, SESSION_MQ_IO_EVT_RING)))
{
svm_msg_q_unlock (mq);
return -2;