From 0b46ff4fd562956319257ca7b97fd00bea47e396 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 6 Oct 2025 23:48:19 -0700 Subject: [PATCH] vcl: handle incomplete dgram read Type: improvement Change-Id: I06e2c61376630e9c969986fa31cc6a17798b8614 Signed-off-by: Florin Coras --- src/vcl/vppcom.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 63646939940..75af90c43df 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -2154,7 +2154,16 @@ vppcom_session_read_internal (uint32_t session_handle, void *buf, int n, read_again: if (s->is_dgram) - rv = app_recv_dgram_raw (rx_fifo, buf, n, &s->transport, 0, peek); + { + rv = app_recv_dgram_raw (rx_fifo, buf, n, &s->transport, 0, peek); + /* Incomplete dgram. Probably due to how transport handled the enq */ + if (PREDICT_FALSE (!rv)) + { + if (is_nonblocking) + return VPPCOM_EWOULDBLOCK; + goto read_again; + } + } else rv = app_recv_stream_raw (rx_fifo, buf, n, 0, peek); -- 2.16.6