From 58c101adf057fc118ccca6e5cb9d02b43499e56a Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Sat, 6 Oct 2018 13:49:16 -0700 Subject: [PATCH] vcl: use want_tx_evt for ct sessions Change-Id: Id46c651c41b1c633326081583ee3383e27ef475d Signed-off-by: Florin Coras --- src/vcl/vppcom.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 5423bb62f9e..3f12b86df42 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1332,12 +1332,11 @@ vppcom_session_read_internal (uint32_t session_handle, void *buf, int n, if (svm_fifo_is_empty (rx_fifo)) svm_fifo_unset_event (rx_fifo); - if (is_ct && n_read + svm_fifo_max_dequeue (rx_fifo) == rx_fifo->nitems) + if (is_ct && svm_fifo_want_tx_evt (rx_fifo)) { - /* If the peer is not polling send notification */ - if (!svm_fifo_has_event (s->rx_fifo)) - app_send_io_evt_to_vpp (s->vpp_evt_q, s->rx_fifo, - SESSION_IO_EVT_CT_RX, SVM_Q_WAIT); + svm_fifo_set_want_tx_evt (s->rx_fifo, 0); + app_send_io_evt_to_vpp (s->vpp_evt_q, s->rx_fifo, SESSION_IO_EVT_CT_RX, + SVM_Q_WAIT); } VDBG (2, "VCL<%d>: vpp handle 0x%llx, sid %u: read %d bytes from (%p)", -- 2.16.6