summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-11-18 12:03:48 -0500
committerDamjan Marion <dmarion@me.com>2018-11-18 19:46:12 +0000
commit0c4fec0134f32bc913299b37d048a99293b1a851 (patch)
tree50a403cbcca98998cf7a116cc97ed7778be50210 /src/vlibmemory
parentfaf22cb303b65e2a6bf8dad959d7f5ee6d031c4f (diff)
Complain if a client binary API queue is full
Definitely indicates a client binary API queue handling issue. We can't simply turf the message, or we'll end up with a more subtle derivative misbehavior. Change-Id: I6363fda1430b0a9ec33ad69badc1e0072fe20fa8 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibmemory')
-rw-r--r--src/vlibmemory/memory_shared.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vlibmemory/memory_shared.c b/src/vlibmemory/memory_shared.c
index 0604b0a1cdf..d6b2b9887d0 100644
--- a/src/vlibmemory/memory_shared.c
+++ b/src/vlibmemory/memory_shared.c
@@ -709,6 +709,14 @@ vl_msg_api_send_shmem (svm_queue_t * q, u8 * elem)
if (am->tx_trace && am->tx_trace->enabled)
vl_msg_api_trace (am, am->tx_trace, (void *) trace[0]);
+ /*
+ * Announce a probable binary API client bug:
+ * some client's input queue is stuffed.
+ * The situation may be recoverable, or not.
+ */
+ if (PREDICT_FALSE
+ (am->vl_clients /* vpp side */ && (q->cursize == q->maxsize)))
+ clib_warning ("WARNING: client input queue at %llx is stuffed...", q);
(void) svm_queue_add (q, elem, 0 /* nowait */ );
}