aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-05-03 13:23:00 -0700
committerFlorin Coras <florin.coras@gmail.com>2024-05-03 20:05:33 +0000
commit916ca8d5a08b1eb8c5ce04b5abbc4c817498e424 (patch)
tree41a9b372fd3ff66cf7184826d20ca473c9beea67
parent51e6c0d5febd21e362b34cc54d80419e395a742e (diff)
vcl: allow more rx events on peekHEADmaster
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 <fcoras@cisco.com> Change-Id: I878fa017f18ada5cef557600673bba920f230542
-rw-r--r--src/vcl/vppcom.c11
1 files changed, 10 insertions, 1 deletions
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;