Compare commits

..

1 Commits

Author SHA1 Message Date
Andrew Yourtchenko
fb6d768419 misc: Initial changes for stable/2009 branch
Change-Id: Ibb982c877427c8382a30ee561c23d878adc9c28d
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-09-09 21:54:44 +00:00
2 changed files with 11 additions and 21 deletions

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2009

View File

@ -1679,15 +1679,14 @@ vl_api_send_pending_rpc_requests (vlib_main_t * vm)
static_always_inline u64
dispatch_pending_interrupts (vlib_main_t * vm, vlib_node_main_t * nm,
u64 cpu_time_now,
vlib_node_interrupt_t * interrupts)
u64 cpu_time_now)
{
vlib_node_runtime_t *n;
for (int i = 0; i < _vec_len (interrupts); i++)
for (int i = 0; i < _vec_len (nm->pending_local_interrupts); i++)
{
vlib_node_interrupt_t *in;
in = vec_elt_at_index (interrupts, i);
in = vec_elt_at_index (nm->pending_local_interrupts, i);
n = vec_elt_at_index (nm->nodes_by_type[VLIB_NODE_TYPE_INPUT],
in->node_runtime_index);
n->interrupt_data = in->data;
@ -1695,6 +1694,7 @@ dispatch_pending_interrupts (vlib_main_t * vm, vlib_node_main_t * nm,
VLIB_NODE_STATE_INTERRUPT, /* frame */ 0,
cpu_time_now);
}
vec_reset_length (nm->pending_local_interrupts);
return cpu_time_now;
}
@ -1708,7 +1708,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
f64 now;
vlib_frame_queue_main_t *fqm;
u32 frame_queue_check_counter = 0;
vlib_node_interrupt_t *empty_int_list = 0;
/* Initialize pending node vector. */
if (is_main)
@ -1729,7 +1728,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
/* Pre-allocate interupt runtime indices and lock. */
vec_alloc (nm->pending_local_interrupts, 32);
vec_alloc (nm->pending_remote_interrupts, 32);
vec_alloc (empty_int_list, 32);
vec_alloc_aligned (nm->pending_remote_interrupts_notify, 1,
CLIB_CACHE_LINE_BYTES);
clib_spinlock_init (&nm->pending_interrupt_lock);
@ -1823,33 +1821,24 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
/* handle local interruots */
if (_vec_len (nm->pending_local_interrupts))
{
vlib_node_interrupt_t *interrupts = nm->pending_local_interrupts;
nm->pending_local_interrupts = empty_int_list;
cpu_time_now = dispatch_pending_interrupts (vm, nm, cpu_time_now,
interrupts);
empty_int_list = interrupts;
vec_reset_length (empty_int_list);
}
cpu_time_now = dispatch_pending_interrupts (vm, nm, cpu_time_now);
/* handle remote interruots */
if (PREDICT_FALSE (_vec_len (nm->pending_remote_interrupts)))
{
vlib_node_interrupt_t *interrupts;
vlib_node_interrupt_t *in;
/* at this point it is known that
* vec_len (nm->pending_local_interrupts) is zero so we quickly swap
* local and remote vector under the spinlock */
clib_spinlock_lock (&nm->pending_interrupt_lock);
interrupts = nm->pending_remote_interrupts;
nm->pending_remote_interrupts = empty_int_list;
in = nm->pending_local_interrupts;
nm->pending_local_interrupts = nm->pending_remote_interrupts;
nm->pending_remote_interrupts = in;
*nm->pending_remote_interrupts_notify = 0;
clib_spinlock_unlock (&nm->pending_interrupt_lock);
cpu_time_now = dispatch_pending_interrupts (vm, nm, cpu_time_now,
interrupts);
empty_int_list = interrupts;
vec_reset_length (empty_int_list);
cpu_time_now = dispatch_pending_interrupts (vm, nm, cpu_time_now);
}
/* Input nodes may have added work to the pending vector.