| 486 | } |
| 487 | |
| 488 | static void |
| 489 | schedule_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 | |
| 507 | static bool |
| 508 | need_immediate_rebuild(struct fib_data *fd, struct rib_cmd_info *rc) |
no test coverage detected