diff options
author | Florin Coras <fcoras@cisco.com> | 2021-03-19 13:12:41 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-03-23 19:58:06 +0000 |
commit | 982e44fcc482cc9bc08e46c2a36ab66b0861bacb (patch) | |
tree | 7f1ad87cd446a6a5db831c947e007d889b6ce1ba /src/vlib/main.c | |
parent | 3853b26c5d8db27df6e2f00539bf021e565614ac (diff) |
vlib: add node adaptive mode flag
Don't switch nodes from interrupt to polling state unless adaptive mode
flag set. For starters, flag set only on interface input nodes
with no polling rx queue and at least one in adaptive mode.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ica1c75f605ead82b7cf74c45c6a774461008f054
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r-- | src/vlib/main.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 41f74b9bdf6..fc6fadb625e 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1056,13 +1056,9 @@ dispatch_node (vlib_main_t * vm, /* n_vectors */ n, /* n_clocks */ t - last_time_stamp); - /* When in interrupt mode and vector rate crosses threshold switch to - polling mode. */ - if (PREDICT_FALSE ((dispatch_state == VLIB_NODE_STATE_INTERRUPT) - || (dispatch_state == VLIB_NODE_STATE_POLLING - && (node->flags - & - VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE)))) + /* When in adaptive mode and vector rate crosses threshold switch to + polling mode and vice versa. */ + if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_ADAPTIVE_MODE)) { /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = |