diff options
author | Florin Coras <fcoras@cisco.com> | 2019-04-17 09:57:46 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-04-17 18:26:42 +0000 |
commit | 317b8e08367c769b90463613231b9fcfad486098 (patch) | |
tree | 9780a58b12e287e969ef342d4f39c121e1c8c2c1 /src/vcl | |
parent | 6407ba56a392f37322001d0ffdca002223b095c0 (diff) |
vcl/session: tx notifications for cut-thru sessions
Change-Id: I076c753e419bbb177d2d28609190715e9895b398
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl')
-rw-r--r-- | src/vcl/vppcom.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |