From 0242d30fc717aeacb758281dad8e5b2e56bf6709 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 22 Dec 2022 15:03:44 -0800 Subject: session: async rx event notifications Move from synchronous flushing of io and ctrl events from transports to applications to an async model via a new session_input input node that runs in interrupt mode. Events are coalesced per application worker. On the one hand, this helps by minimizing message queue locking churn. And on the other, it opens the possibility for further optimizations of event message generation, obviates need for rx rescheduling rpcs and is a first step towards a fully async data/io rx path. Type: improvement Signed-off-by: Florin Coras Change-Id: Id6bebcb65fc9feef8aa02ddf1af6d9ba6f6745ce --- src/plugins/hs_apps/echo_client.c | 6 ++---- src/plugins/hs_apps/echo_server.c | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/hs_apps') diff --git a/src/plugins/hs_apps/echo_client.c b/src/plugins/hs_apps/echo_client.c index a7358a61952..d449045cf6a 100644 --- a/src/plugins/hs_apps/echo_client.c +++ b/src/plugins/hs_apps/echo_client.c @@ -706,10 +706,8 @@ ec_session_rx_callback (session_t *s) receive_data_chunk (wrk, es); if (svm_fifo_max_dequeue_cons (s->rx_fifo)) - { - if (svm_fifo_set_event (s->rx_fifo)) - session_send_io_evt_to_thread (s->rx_fifo, SESSION_IO_EVT_BUILTIN_RX); - } + session_enqueue_notify (s); + return 0; } diff --git a/src/plugins/hs_apps/echo_server.c b/src/plugins/hs_apps/echo_server.c index 6a291163bd1..178e9eef4fb 100644 --- a/src/plugins/hs_apps/echo_server.c +++ b/src/plugins/hs_apps/echo_server.c @@ -228,6 +228,8 @@ echo_server_rx_callback (session_t * s) /* Program self-tap to retry */ if (svm_fifo_set_event (rx_fifo)) { + /* TODO should be session_enqueue_notify(s) but quic tests seem + * to fail if that's the case */ if (session_send_io_evt_to_thread (rx_fifo, SESSION_IO_EVT_BUILTIN_RX)) clib_warning ("failed to enqueue self-tap"); -- cgit 1.2.3-korg