session: fix non-blocking msg enqueue to vpp mq
[vpp.git] / src / vnet / session / application_interface.h
index cddc031..d786931 100644 (file)
@@ -581,7 +581,8 @@ app_send_io_evt_to_vpp (svm_msg_q_t * mq, u32 session_index, u8 evt_type,
     {
       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;