aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-05-16 19:28:24 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-18 07:49:59 +0000
commitfd542f1085d3a06066168c2d38e7f328b5b26ee3 (patch)
tree6509d0115ff79f28175a747eef1b18ba6d807ce0 /src/vlib
parenta23b615aa4b7bf1eee6ad099f41c3c8f1c85d723 (diff)
session: add session process node
Add a session process node that handles main thread tx and retransmit in order to avoid having a polling input node. Change-Id: I3357e987c023a84b533b32793e37ab4204420f64 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index d1f7592e502..7da519241bb 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -1276,6 +1276,7 @@ dispatch_process (vlib_main_t * vm,
vlib_node_main_t *nm = &vm->node_main;
vlib_node_runtime_t *node_runtime = &p->node_runtime;
vlib_node_t *node = vlib_get_node (vm, node_runtime->node_index);
+ u32 old_process_index;
u64 t;
uword n_vectors, is_suspend;
@@ -1291,11 +1292,12 @@ dispatch_process (vlib_main_t * vm,
f ? f->n_vectors : 0, /* is_after */ 0);
/* Save away current process for suspend. */
+ old_process_index = nm->current_process_index;
nm->current_process_index = node->runtime_index;
n_vectors = vlib_process_startup (vm, p, f);
- nm->current_process_index = ~0;
+ nm->current_process_index = old_process_index;
ASSERT (n_vectors != VLIB_PROCESS_RETURN_LONGJMP_RETURN);
is_suspend = n_vectors == VLIB_PROCESS_RETURN_LONGJMP_SUSPEND;