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 <fcoras@cisco.com>
Change-Id: I878fa017f18ada5cef557600673bba920f230542
This commit is contained in:
Florin Coras
2024-05-03 13:23:00 -07:00
committed by Florin Coras
parent 51e6c0d5fe
commit 916ca8d5a0

View File

@ -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;