X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvppcom.c;h=3f12b86df42950aa2b392fea0f77b2d7540d3cff;hb=58c101adf057fc118ccca6e5cb9d02b43499e56a;hp=5423bb62f9ecb4c6c8c0c7a47a7086d072165fe9;hpb=318de5de9765afb75522ad68da5f5a0371480098;p=vpp.git 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)",