From b677907c995216479ce5430fa07b3562686db5f2 Mon Sep 17 00:00:00 2001 From: Duncan Eastoe Date: Tue, 22 Dec 2020 19:47:17 +0000 Subject: [PATCH] zebra: fpm_nl_process() reschedule dp thread fpm_nl_process() now ensures that the dataplane thread is rescheduled if it hits the work limit while processing its incoming work queue. This would probably already occur due to some other event, such as fpm_process_queue() enqueuing completed work to the output queue, however it does no harm to add this explicit reschedule. Signed-off-by: Duncan Eastoe --- zebra/dplane_fpm_nl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c index b6ea6745e8..51ce59c477 100644 --- a/zebra/dplane_fpm_nl.c +++ b/zebra/dplane_fpm_nl.c @@ -1467,6 +1467,10 @@ static int fpm_nl_process(struct zebra_dplane_provider *prov) thread_add_timer(fnc->fthread->master, fpm_process_queue, fnc, 0, &fnc->t_dequeue); + /* Ensure dataplane thread is rescheduled if we hit the work limit */ + if (counter >= limit) + dplane_provider_work_ready(); + return 0; } -- 2.39.5