From 0c7f54d489c66742903c460daa843ce048dbaf06 Mon Sep 17 00:00:00 2001 From: Aloys Augustin Date: Wed, 3 Jul 2019 16:59:43 +0200 Subject: quic: fifo notifications fix Add SESSION_IO_EVT_RX handling in session_send_evt_to_thread to allow internal apps to send rx events ("tx notifications") to quic. Add a call to quic_send_packets in quic_custom_app_rx_callback to ensure QUIC ACKs are sent if there is no other activity on the connection. Type: fix Change-Id: I885e01e6475e5b0274f274e9dd34d4a771719e69 Signed-off-by: Aloys Augustin --- src/plugins/quic/quic.c | 5 +++++ src/vnet/session/session.c | 1 + 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c index a990d0448bf..343e6b83222 100644 --- a/src/plugins/quic/quic.c +++ b/src/plugins/quic/quic.c @@ -1839,10 +1839,15 @@ quic_del_segment_callback (u32 client_index, u64 seg_handle) static int quic_custom_app_rx_callback (transport_connection_t * tc) { + quic_ctx_t *ctx; session_t *stream_session = session_get (tc->s_index, tc->thread_index); QUIC_DBG (2, "Received app READ notification"); quic_ack_rx_data (stream_session); svm_fifo_reset_has_deq_ntf (stream_session->rx_fifo); + /* Need to send packets (acks may never be sent otherwise) */ + ctx = quic_ctx_get (stream_session->connection_index, + stream_session->thread_index); + quic_send_packets (ctx); return 0; } diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 3732e4cb708..faaaad4bada 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -55,6 +55,7 @@ session_send_evt_to_thread (void *data, void *args, u32 thread_index, evt->rpc_args.fp = data; evt->rpc_args.arg = args; break; + case SESSION_IO_EVT_RX: case SESSION_IO_EVT_TX: case SESSION_IO_EVT_TX_FLUSH: case SESSION_IO_EVT_BUILTIN_RX: -- cgit 1.2.3-korg