From: Florin Coras Date: Fri, 3 May 2024 20:23:00 +0000 (-0700) Subject: vcl: allow more rx events on peek X-Git-Tag: v24.10-rc0~45 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=916ca8d5a08b1eb8c5ce04b5abbc4c817498e424;p=vpp.git vcl: allow more rx events on peek If peek touches all data in the fifo, unset fifo event to request new events when more data is enqueued. Type: improvement Signed-off-by: Florin Coras Change-Id: I878fa017f18ada5cef557600673bba920f230542 --- diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 58f6ac0a134..a557093e897 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -2087,7 +2087,16 @@ read_again: ASSERT (rv >= 0); if (peek) - return rv; + { + /* Request new notifications if more data enqueued */ + if (rv < n || rv == svm_fifo_max_dequeue_cons (rx_fifo)) + { + if (is_ct) + svm_fifo_unset_event (s->rx_fifo); + svm_fifo_unset_event (rx_fifo); + } + return rv; + } n_read += rv;