session: fix non-blocking msg enqueue to vpp mq
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7228a01d38e61cc00358419b2512ca0da4f76ff5
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index cddc031..d786931 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -581,7 +581,8 @@
{
if (svm_msg_q_try_lock (mq))
return -1;
- if (PREDICT_FALSE (svm_msg_q_ring_is_full (mq, SESSION_MQ_IO_EVT_RING)))
+ if (PREDICT_FALSE (svm_msg_q_ring_is_full (mq, SESSION_MQ_IO_EVT_RING)
+ || svm_msg_q_is_full (mq)))
{
svm_msg_q_unlock (mq);
return -2;