From 7da8829d8152ef5105a57231fd1d91700e9b4f6c Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 18 Mar 2021 15:04:34 -0700 Subject: session: basic support for interrupt mode Experimental support for session layer interrupt mode. When enabled (use-private-rx-mqs must be set) session queue node switches to interrupt state when lightly loaded, i.e., no events and less than 1 vector/dispatch. Because transport protocols require a periodic time update, when in interrupt state the session queue node workers register a timerfd with the unix-epoll-input node that when triggered signals, i.e., wakes up, the queue node. Under light load, the timer is set to trigger every 1ms whereas if no session is allocated, the worker moves to idle state and the timeout is set to 100ms. Type: feature Signed-off-by: Florin Coras Change-Id: I905b00777fbc025faf9c4074fce4c516cd139387 --- src/vnet/session/application.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vnet/session/application.c') diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c index 16acc9c997d..a93e4b9dbbf 100644 --- a/src/vnet/session/application.c +++ b/src/vnet/session/application.c @@ -497,6 +497,9 @@ VLIB_NODE_FN (appsl_rx_mqs_input_node) if (aw->pending_rx_mqs) vlib_node_set_interrupt_pending (vm, appsl_rx_mqs_input_node.index); + if (n_msgs && wrk->state == SESSION_WRK_INTERRUPT) + vlib_node_set_interrupt_pending (vm, session_queue_node.index); + return n_msgs; } -- cgit 1.2.3-korg