MCPcopy Create free account
hub / github.com/F-Stack/f-stack / schedule_algo_eval

Function schedule_algo_eval

freebsd/net/route/fib_algo.c:488–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488static void
489schedule_algo_eval(struct fib_data *fd)
490{
491
492 RIB_WLOCK_ASSERT(fd->fd_rh);
493
494 if (fd->fd_num_changes++ == 0) {
495 /* Start callout to consider switch */
496 if (!callout_pending(&fd->fd_callout))
497 schedule_callout(fd, ALGO_EVAL_DELAY_MS);
498 } else if (fd->fd_num_changes > ALGO_EVAL_NUM_ROUTES && !fd->fd_force_eval) {
499 /* Reset callout to exec immediately */
500 if (!fd->fd_need_rebuild) {
501 fd->fd_force_eval = true;
502 schedule_callout(fd, 1);
503 }
504 }
505}
506
507static bool
508need_immediate_rebuild(struct fib_data *fd, struct rib_cmd_info *rc)

Callers 1

handle_rtable_change_cbFunction · 0.85

Calls 1

schedule_calloutFunction · 0.85

Tested by

no test coverage detected