summaryrefslogtreecommitdiffstats
path: root/src/vlib/node.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-07-23 14:24:22 +0200
committerFlorin Coras <florin.coras@gmail.com>2023-07-25 20:10:29 +0000
commitcc8249c5fde1b00b043066617d35325dd1606cd6 (patch)
tree105b40cf6eb8d00440832dd73aa4544aa173fd5a /src/vlib/node.c
parent3f40755749b07e5a936ad6d15622e371e7e5c25e (diff)
vlib: interrupt mode support for pre-input nodes
Type: improvement Change-Id: Ic6e60597d2be63e3a0ae4399a81dbbd72392f30d Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/node.c')
-rw-r--r--src/vlib/node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vlib/node.c b/src/vlib/node.c
index 4d1ef989e7d..8b726ff9aad 100644
--- a/src/vlib/node.c
+++ b/src/vlib/node.c
@@ -530,7 +530,10 @@ vlib_register_node (vlib_main_t *vm, vlib_node_registration_t *r, char *fmt,
vec_add2_aligned (nm->nodes_by_type[n->type], rt, 1,
/* align */ CLIB_CACHE_LINE_BYTES);
if (n->type == VLIB_NODE_TYPE_INPUT)
- clib_interrupt_resize (&nm->interrupts,
+ clib_interrupt_resize (&nm->input_node_interrupts,
+ vec_len (nm->nodes_by_type[n->type]));
+ else if (n->type == VLIB_NODE_TYPE_PRE_INPUT)
+ clib_interrupt_resize (&nm->pre_input_node_interrupts,
vec_len (nm->nodes_by_type[n->type]));
n->runtime_index = rt - nm->nodes_by_type[n->type];
}