From 317b8e08367c769b90463613231b9fcfad486098 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 17 Apr 2019 09:57:46 -0700 Subject: vcl/session: tx notifications for cut-thru sessions Change-Id: I076c753e419bbb177d2d28609190715e9895b398 Signed-off-by: Florin Coras --- src/vcl/vppcom.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/vcl') diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index b5953872f81..e70aa001772 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1530,6 +1530,14 @@ vppcom_session_read_internal (uint32_t session_handle, void *buf, int n, if (svm_fifo_is_empty_cons (rx_fifo)) svm_fifo_unset_event (s->rx_fifo); + /* Cut-through sessions might request tx notifications on rx fifos */ + if (PREDICT_FALSE (rx_fifo->want_tx_ntf)) + { + app_send_io_evt_to_vpp (s->vpp_evt_q, s->rx_fifo->master_session_index, + SESSION_IO_EVT_RX, SVM_Q_WAIT); + svm_fifo_reset_tx_ntf (s->rx_fifo); + } + VDBG (2, "session %u[0x%llx]: read %d bytes from (%p)", s->session_index, s->vpp_handle, n_read, rx_fifo); -- cgit 1.2.3-korg