Skip to content

Commit

Permalink
zebra: Use event_add_event instead of _timer
Browse files Browse the repository at this point in the history
The t_dequeue was being enqueued with a timer of 0
this is really an event instead of a timer.  Let's
use that instead.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Dec 14, 2023
1 parent 3209ca4 commit 61af06c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zebra/dplane_fpm_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ static void fpm_process_queue(struct event *t)

/* Re-schedule if we ran out of buffer space */
if (no_bufs) {
event_add_timer(fnc->fthread->master, fpm_process_queue, fnc, 0,
event_add_event(fnc->fthread->master, fpm_process_queue, fnc, 0,
&fnc->t_dequeue);
event_add_timer(fnc->fthread->master, fpm_process_wedged, fnc,
DPLANE_FPM_NL_WEDGIE_TIME, &fnc->t_wedged);
Expand Down Expand Up @@ -1640,7 +1640,7 @@ static int fpm_nl_process(struct zebra_dplane_provider *prov)
if (atomic_load_explicit(&fnc->counters.ctxqueue_len,
memory_order_relaxed)
> 0)
event_add_timer(fnc->fthread->master, fpm_process_queue, fnc, 0,
event_add_event(fnc->fthread->master, fpm_process_queue, fnc, 0,
&fnc->t_dequeue);

/* Ensure dataplane thread is rescheduled if we hit the work limit */
Expand Down

0 comments on commit 61af06c

Please sign in to comment.