summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-09-02 20:52:58 -0700
committerFlorin Coras <fcoras@cisco.com>2020-09-02 20:52:58 -0700
commit56230097e2a642740a1a00483e54419edc7fc2ba (patch)
treea279facda07219c352b20e62ac8f3ab25eabb612
parent67fe778546683d678015cc0089bbe475cb6a6f22 (diff)
vcl: handle svm fifo write failure
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4b132cad8ff906ef24846cc43935ccfd6aa7b4ec
-rw-r--r--src/vcl/vppcom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 71578b076d2..9174e5d6d2f 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2172,7 +2172,9 @@ vppcom_session_write_inline (vcl_worker_t * wrk, vcl_session_t * s, void *buf,
app_send_io_evt_to_vpp (s->vpp_evt_q, s->tx_fifo->master_session_index,
et, SVM_Q_WAIT);
- ASSERT (n_write > 0);
+ /* The underlying fifo segment can run out of memory */
+ if (PREDICT_FALSE (n_write < 0))
+ return VPPCOM_EAGAIN;
VDBG (2, "session %u [0x%llx]: wrote %d bytes", s->session_index,
s->vpp_handle, n_write);