vlib: process node scheduler rework

This commit allow use od cooperative multitasking with multiple
descheduling reasons (i.e. event wait and suspend) inside the same
process node. In previus code remote node will wake up process node
by sending event evein if process node is waiting in
vlib_process_ssupend().

This change also allowed new vlib_process_yield() API which deschedules
current process and it puts it into the end of queue.

Change-Id: I846e5a99b4ea1809eb80895f6ffe0ef0b2fd21ae
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2024-09-10 17:07:49 +02:00
committed by Ole Tr�an
parent d8022139eb
commit dfa77dc606
6 changed files with 245 additions and 151 deletions

View File

@@ -50,7 +50,7 @@ rte_delay_us_override (unsigned us)
{
/* Only suspend for the admin_down_process */
vlib_process_t *proc = vlib_get_current_process (vm);
if (!(proc->flags & VLIB_PROCESS_IS_RUNNING) ||
if (proc->state != VLIB_PROCESS_STATE_RUNNING ||
(proc->node_runtime.node_index !=
admin_up_down_process_node.index))
return 0;