From: Florin Coras Date: Tue, 7 Oct 2025 06:48:19 +0000 (-0700) Subject: vcl: handle incomplete dgram read X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F43850%2F2;p=vpp.git vcl: handle incomplete dgram read Type: improvement Change-Id: I06e2c61376630e9c969986fa31cc6a17798b8614 Signed-off-by: Florin Coras --- 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);