]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: fpm_nl_process() reschedule dp thread
authorDuncan Eastoe <duncan.eastoe@att.com>
Tue, 22 Dec 2020 19:47:17 +0000 (19:47 +0000)
committerDuncan Eastoe <duncan.eastoe@att.com>
Tue, 22 Dec 2020 21:14:03 +0000 (21:14 +0000)
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 <duncan.eastoe@att.com>
zebra/dplane_fpm_nl.c

index b6ea6745e8031fc221ff324b79a151fdfaa5ceed..51ce59c477b7e091bae1b6209e638dfb652dd211 100644 (file)
@@ -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;
 }