Lines Matching +full:usecase +full:- +full:specific

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
74 * This framework enables accelerated longest-prefix-match lookups for the
78 * flm - fib lookup modules - implementation of particular lookup algorithm
79 * fd - fib data - instance of an flm bound to specific routing table
85 * 1) nexhops abstraction -> provides transparent referencing, indexing
86 * and efficient idx->ptr mappings for nexthop and nexthop groups.
95 * and its argument. This function will be called with a family-specific lookup key,
96 * scope and provided argument. This array gets re-created every time when new algo
181 struct nhop_object **nh_idx; /* nhop idx->ptr array */
219 /* Schedule algo re-evaluation X seconds after a change */
221 /* Force algo re-evaluation after X changes */
249 _RH_PRINTF(_rh->rib_fibnum, _rh->rib_family, __func__, _fmt, ## __VA_ARGS__);\
253 _ALGO_PRINTF(_fd->fd_fibnum, _fd->fd_family, _fd->fd_flm->flm_name, \
254 _fd->fd_gen, __func__, _fmt, ## __VA_ARGS__); \
283 /* Datastructure for storing non-transient fib lookup module failures */
293 /* Per-family array of fibnum -> {func, arg} mappings used in datapath */
301 * Tries to add new non-transient algorithm error to the list of
313 fe->fe_flm = flm; in flm_error_add()
314 fe->fe_family = flm->flm_family; in flm_error_add()
315 fe->fe_fibnum = fibnum; in flm_error_add()
331 * True if non-transient error has been registered for @flm in @fibnum.
339 if ((fe->fe_flm == flm) && (fe->fe_fibnum == fibnum)) in flm_error_check()
357 if (fe->fe_flm == flm) { in fib_error_clear_flm()
426 _ALGO_PRINTF(fd->fd_fibnum, fd->fd_family, fd->fd_flm->flm_name, in fib_printf()
427 fd->fd_gen, func, "%s", buf); in fib_printf()
444 if (flm->flm_family == family) { in print_algos_sysctl()
447 sbuf_cat(&sbuf, flm->flm_name); in print_algos_sysctl()
489 if (fd->fd_failed_rebuilds > 10) in callout_calc_delay_ms()
492 shift = fd->fd_failed_rebuilds; in callout_calc_delay_ms()
502 fd->fd_callout_action = action; in schedule_callout()
503 callout_reset_sbt(&fd->fd_callout, SBT_1MS * delay_ms, 0, in schedule_callout()
511 RIB_WLOCK_ASSERT(fd->fd_rh); in schedule_fd_rebuild()
513 if (!fd->fd_need_rebuild) { in schedule_fd_rebuild()
514 fd->fd_need_rebuild = true; in schedule_fd_rebuild()
516 fd->fd_batch = false; in schedule_fd_rebuild()
519 * Potentially re-schedules pending callout in schedule_fd_rebuild()
523 reason, fd->fd_failed_rebuilds); in schedule_fd_rebuild()
531 FD_PRINTF(LOG_DEBUG, fd, "Sync gen %u -> %u", fd->fd_rh->rnh_gen, fd->fd_rh->rnh_gen_rib); in sync_rib_gen()
532 fd->fd_rh->rnh_gen = fd->fd_rh->rnh_gen_rib; in sync_rib_gen()
540 diff = ((int64_t)(new_tv->tv_sec - old_tv->tv_sec)) * 1000; in get_tv_diff_ms()
541 diff += (new_tv->tv_usec - old_tv->tv_usec) / 1000; in get_tv_diff_ms()
549 tv->tv_sec += ms / 1000; in add_tv_diff_ms()
551 if (ms * 1000 + tv->tv_usec < 1000000) in add_tv_diff_ms()
552 tv->tv_usec += ms * 1000; in add_tv_diff_ms()
554 tv->tv_sec += 1; in add_tv_diff_ms()
555 tv->tv_usec = ms * 1000 + tv->tv_usec - 1000000; in add_tv_diff_ms()
565 struct fib_sync_status *fd_ss = &fd->fd_ss; in mark_diverge_time()
567 getmicrouptime(&fd_ss->diverge_time); in mark_diverge_time()
568 fd_ss->bucket_id = 0; in mark_diverge_time()
569 fd_ss->bucket_changes = 0; in mark_diverge_time()
578 * High-level algorithm looks the following:
596 /* calculate per-bucket threshold rate */ in update_rebuild_delay()
601 struct fib_sync_status *fd_ss = &fd->fd_ss; in update_rebuild_delay()
603 bucket_id = get_tv_diff_ms(&fd_ss->diverge_time, &tv) / bucket_time_ms; in update_rebuild_delay()
605 if (fd_ss->bucket_id == bucket_id) { in update_rebuild_delay()
606 fd_ss->bucket_changes++; in update_rebuild_delay()
607 if (fd_ss->bucket_changes == threshold_rate) { in update_rebuild_delay()
619 } else if ((bucket_id == 0) && (fd_ss->bucket_changes == 1)) in update_rebuild_delay()
622 fd_ss->bucket_id = bucket_id; in update_rebuild_delay()
623 fd_ss->bucket_changes = 1; in update_rebuild_delay()
628 struct timeval new_tv = fd_ss->diverge_time; in update_rebuild_delay()
640 RIB_WLOCK_ASSERT(fd->fd_rh); in update_algo_state()
642 if (fd->fd_batch || fd->fd_need_rebuild) { in update_algo_state()
643 enum fib_callout_action action = fd->fd_need_rebuild ? FDA_REBUILD : FDA_BATCH; in update_algo_state()
648 if (fd->fd_num_changes++ == 0) { in update_algo_state()
650 if (!callout_pending(&fd->fd_callout)) in update_algo_state()
652 } else if (fd->fd_num_changes == ALGO_EVAL_NUM_ROUTES) { in update_algo_state()
654 if (fd->fd_callout_action == FDA_EVAL) in update_algo_state()
665 switch (rc->rc_cmd) { in need_immediate_sync()
667 nh = rc->rc_nh_new; in need_immediate_sync()
669 if (!(nh->nh_flags & NHF_GATEWAY)) in need_immediate_sync()
676 nh = rc->rc_nh_old; in need_immediate_sync()
678 if (!(nh->nh_flags & NHF_GATEWAY)) in need_immediate_sync()
693 struct fib_change_queue *q = &fd->fd_ss.fd_change_queue; in apply_rtable_changes()
695 result = fd->fd_flm->flm_change_rib_items_cb(fd->fd_rh, q, fd->fd_algo_data); in apply_rtable_changes()
699 for (int i = 0; i < q->count; i++) in apply_rtable_changes()
700 if (q->entries[i].nh_old) in apply_rtable_changes()
701 fib_unref_nhop(fd, q->entries[i].nh_old); in apply_rtable_changes()
702 q->count = 0; in apply_rtable_changes()
704 fd->fd_batch = false; in apply_rtable_changes()
714 switch (fd->fd_family) { in fill_change_entry()
717 rt_get_inet_prefix_plen(rc->rc_rt, &ce->addr4, &plen, &ce->scopeid); in fill_change_entry()
722 rt_get_inet6_prefix_plen(rc->rc_rt, &ce->addr6, &plen, &ce->scopeid); in fill_change_entry()
727 ce->plen = plen; in fill_change_entry()
728 ce->nh_old = rc->rc_nh_old; in fill_change_entry()
729 ce->nh_new = rc->rc_nh_new; in fill_change_entry()
730 if (ce->nh_new != NULL) { in fill_change_entry()
731 if (fib_ref_nhop(fd, ce->nh_new) == 0) in fill_change_entry()
741 struct fib_change_queue *q = &fd->fd_ss.fd_change_queue; in queue_rtable_change()
743 if (q->count >= q->size) { in queue_rtable_change()
746 if (q->size == 0) in queue_rtable_change()
749 q_size = q->size * 2; in queue_rtable_change()
752 void *a = realloc(q->entries, size, M_TEMP, M_NOWAIT | M_ZERO); in queue_rtable_change()
758 q->entries = a; in queue_rtable_change()
759 q->size = q_size; in queue_rtable_change()
762 return (fill_change_entry(fd, &q->entries[q->count++], rc)); in queue_rtable_change()
784 if (!fd->init_done) in handle_rtable_change_cb()
789 /* Consider scheduling algorithm re-evaluation */ in handle_rtable_change_cb()
796 if (fd->fd_need_rebuild) { in handle_rtable_change_cb()
806 if (fd->fd_batch) { in handle_rtable_change_cb()
822 if (rc->rc_nh_new != NULL) { in handle_rtable_change_cb()
823 if (fib_ref_nhop(fd, rc->rc_nh_new) == 0) { in handle_rtable_change_cb()
830 result = fd->fd_flm->flm_change_rib_item_cb(rnh, rc, fd->fd_algo_data); in handle_rtable_change_cb()
836 if (rc->rc_nh_old != NULL) in handle_rtable_change_cb()
837 fib_unref_nhop(fd, rc->rc_nh_old); in handle_rtable_change_cb()
846 fd->fd_batch = true; in handle_rtable_change_cb()
874 * Algo reported a non-recoverable error. in handle_rtable_change_cb()
878 FD_PRINTF(LOG_ERR, fd, "algo reported non-recoverable error"); in handle_rtable_change_cb()
879 if (!flm_error_add(fd->fd_flm, fd->fd_fibnum)) in handle_rtable_change_cb()
881 schedule_fd_rebuild(fd, "algo reported non-recoverable error"); in handle_rtable_change_cb()
891 fd->number_nhops = 16; in estimate_nhop_scale()
895 if (old_fd->hit_nhops && old_fd->number_nhops < FIB_MAX_NHOPS) in estimate_nhop_scale()
896 fd->number_nhops = 2 * old_fd->number_nhops; in estimate_nhop_scale()
898 fd->number_nhops = old_fd->number_nhops; in estimate_nhop_scale()
909 * Performs post-dump framework checks and calls
918 struct fib_data *fd = w->fd; in sync_algo_end_cb()
920 RIB_WLOCK_ASSERT(w->fd->fd_rh); in sync_algo_end_cb()
922 if (rnh->rib_dying) { in sync_algo_end_cb()
923 w->result = FLM_ERROR; in sync_algo_end_cb()
927 if (fd->hit_nhops) { in sync_algo_end_cb()
929 fd->nh_ref_table->count); in sync_algo_end_cb()
930 if (w->result == FLM_SUCCESS) in sync_algo_end_cb()
931 w->result = FLM_REBUILD; in sync_algo_end_cb()
935 if (stage != RIB_WALK_HOOK_POST || w->result != FLM_SUCCESS) in sync_algo_end_cb()
938 /* Post-dump hook, dump successful */ in sync_algo_end_cb()
939 w->result = fd->fd_flm->flm_dump_end_cb(fd->fd_algo_data, &fd->fd_dp); in sync_algo_end_cb()
941 if (w->result == FLM_SUCCESS) { in sync_algo_end_cb()
943 fd->init_done = 1; in sync_algo_end_cb()
957 RIB_WLOCK_ASSERT(w->fd->fd_rh); in sync_algo_cb()
959 if (w->result == FLM_SUCCESS && w->func) { in sync_algo_cb()
967 if (fib_ref_nhop(w->fd, nh) != 0) in sync_algo_cb()
968 w->result = w->func(rt, w->fd->fd_algo_data); in sync_algo_cb()
970 w->result = FLM_REBUILD; in sync_algo_cb()
984 .func = fd->fd_flm->flm_dump_rib_item_cb, in sync_algo()
988 rib_walk_ext_locked(fd->fd_rh, sync_algo_cb, sync_algo_end_cb, &w); in sync_algo()
992 fd->fd_rh->rnh_gen, print_op_result(w.result)); in sync_algo()
998 * Schedules epoch-backed @fd instance deletion.
1012 RIB_WLOCK_ASSERT(fd->fd_rh); in schedule_destroy_fd_instance()
1015 is_dead = fd->fd_dead; in schedule_destroy_fd_instance()
1017 fd->fd_dead = true; in schedule_destroy_fd_instance()
1018 if (fd->fd_linked) { in schedule_destroy_fd_instance()
1020 fd->fd_linked = false; in schedule_destroy_fd_instance()
1028 if (fd->fd_rs != NULL) in schedule_destroy_fd_instance()
1029 rib_unsubscribe_locked(fd->fd_rs); in schedule_destroy_fd_instance()
1035 callout_stop(&fd->fd_callout); in schedule_destroy_fd_instance()
1037 fib_epoch_call(destroy_fd_instance_epoch, &fd->fd_epoch_ctx); in schedule_destroy_fd_instance()
1055 if (fd->fd_rh == rh) { in fib_cleanup_algo()
1061 fd->fd_linked = false; in fib_cleanup_algo()
1071 RIB_WLOCK(fd->fd_rh); in fib_cleanup_algo()
1074 RIB_WUNLOCK(fd->fd_rh); in fib_cleanup_algo()
1101 if (fd->fd_algo_data != NULL) in destroy_fd_instance()
1102 fd->fd_flm->flm_destroy_cb(fd->fd_algo_data); in destroy_fd_instance()
1105 if ((fd->nh_idx != NULL) && (fd->nh_ref_table != NULL)) { in destroy_fd_instance()
1106 for (int i = 0; i < fd->number_nhops; i++) { in destroy_fd_instance()
1109 i, fd->nh_idx[i]); in destroy_fd_instance()
1110 nhop_free_any(fd->nh_idx[i]); in destroy_fd_instance()
1113 free(fd->nh_idx, M_RTABLE); in destroy_fd_instance()
1115 if (fd->nh_ref_table != NULL) in destroy_fd_instance()
1116 free(fd->nh_ref_table, M_RTABLE); in destroy_fd_instance()
1118 if (fd->fd_ss.fd_change_queue.entries != NULL) in destroy_fd_instance()
1119 free(fd->fd_ss.fd_change_queue.entries, M_TEMP); in destroy_fd_instance()
1121 fib_unref_algo(fd->fd_flm); in destroy_fd_instance()
1136 CURVNET_SET(fd->fd_vnet); in destroy_fd_instance_epoch()
1143 * - Allocates fd/nhop table
1144 * - Runs algo:flm_init_cb algo init
1145 * - Subscribes fd to the rib
1146 * - Runs rtable dump
1147 * - Adds instance to the list of active instances.
1171 fd->fd_rh = rh; in try_setup_fd_instance()
1172 fd->fd_family = rh->rib_family; in try_setup_fd_instance()
1173 fd->fd_fibnum = rh->rib_fibnum; in try_setup_fd_instance()
1174 callout_init_rm(&fd->fd_callout, &rh->rib_lock, 0); in try_setup_fd_instance()
1175 fd->fd_vnet = curvnet; in try_setup_fd_instance()
1176 fd->fd_flm = flm; in try_setup_fd_instance()
1179 flm->flm_refcount++; in try_setup_fd_instance()
1180 fd->fd_gen = ++fib_gen; in try_setup_fd_instance()
1185 /* Allocate nhidx -> nhop_ptr table */ in try_setup_fd_instance()
1186 size = fd->number_nhops * sizeof(void *); in try_setup_fd_instance()
1187 fd->nh_idx = malloc(size, M_RTABLE, M_NOWAIT | M_ZERO); in try_setup_fd_instance()
1188 if (fd->nh_idx == NULL) { in try_setup_fd_instance()
1195 size += fd->number_nhops * sizeof(uint32_t); in try_setup_fd_instance()
1196 fd->nh_ref_table = malloc(size, M_RTABLE, M_NOWAIT | M_ZERO); in try_setup_fd_instance()
1197 if (fd->nh_ref_table == NULL) { in try_setup_fd_instance()
1201 FD_PRINTF(LOG_DEBUG, fd, "Allocated %u nhop indexes", fd->number_nhops); in try_setup_fd_instance()
1204 void *old_algo_data = (old_fd != NULL) ? old_fd->fd_algo_data : NULL; in try_setup_fd_instance()
1205 result = flm->flm_init_cb(fd->fd_fibnum, fd, old_algo_data, &fd->fd_algo_data); in try_setup_fd_instance()
1207 FD_PRINTF(LOG_INFO, fd, "%s algo init failed", flm->flm_name); in try_setup_fd_instance()
1212 if (flm->flm_change_rib_item_cb != NULL) { in try_setup_fd_instance()
1213 fd->fd_rs = rib_subscribe_locked(fd->fd_rh, in try_setup_fd_instance()
1215 if (fd->fd_rs == NULL) { in try_setup_fd_instance()
1236 fd->fd_linked = true; in try_setup_fd_instance()
1262 if (fib_set_datapath_ptr(new_fd, &new_fd->fd_dp)) in setup_fd_instance()
1287 "%s algo instance setup failed, failures=%d", flm->flm_name, in setup_fd_instance()
1288 orig_fd ? orig_fd->fd_failed_rebuilds + 1 : 0); in setup_fd_instance()
1292 orig_fd->fd_failed_rebuilds++; in setup_fd_instance()
1295 /* Ban algo on non-recoverable error */ in setup_fd_instance()
1297 flm_error_add(flm, rh->rib_fibnum); in setup_fd_instance()
1319 enum fib_callout_action action = fd->fd_callout_action; in execute_callout_action()
1324 RIB_WLOCK_ASSERT(fd->fd_rh); in execute_callout_action()
1326 fd->fd_need_rebuild = false; in execute_callout_action()
1327 fd->fd_batch = false; in execute_callout_action()
1328 fd->fd_num_changes = 0; in execute_callout_action()
1331 if (!is_algo_fixed(fd->fd_rh)) in execute_callout_action()
1332 flm_new = fib_check_best_algo(fd->fd_rh, fd->fd_flm); in execute_callout_action()
1343 result = rebuild_fd_flm(fd, flm_new != NULL ? flm_new : fd->fd_flm); in execute_callout_action()
1351 * Callout for all scheduled fd-related work.
1352 * - Checks if the current algo is still the best algo
1353 * - Synchronises algo instance to the rtable (batch usecase)
1354 * - Creates a new instance of an algo for af/fib if desired.
1362 FD_PRINTF(LOG_INFO, fd, "running callout type=%d", fd->fd_callout_action); in handle_fd_callout()
1365 CURVNET_SET(fd->fd_vnet); in handle_fd_callout()
1381 if (flm_new == fd->fd_flm) in rebuild_fd_flm()
1384 FD_PRINTF(LOG_INFO, fd, "switching algo to %s", flm_new->flm_name); in rebuild_fd_flm()
1386 result = setup_fd_instance(flm_new, fd->fd_rh, fd_tmp, &fd_new, true); in rebuild_fd_flm()
1405 if (!is_algo_fixed(fd->fd_rh)) in rebuild_fd()
1406 flm_new = fib_check_best_algo(fd->fd_rh, fd->fd_flm); in rebuild_fd()
1409 result = rebuild_fd_flm(fd, flm_new != NULL ? flm_new : fd->fd_flm); in rebuild_fd()
1432 if ((strcmp(flm->flm_name, algo_name) == 0) && in fib_find_algo()
1433 (family == flm->flm_family)) { in fib_find_algo()
1434 flm->flm_refcount++; in fib_find_algo()
1449 flm->flm_refcount--; in fib_unref_algo()
1467 if ((fd->fd_family == family) && (fd->fd_fibnum == fibnum)) in set_fib_algo()
1474 rh = fd->fd_rh; in set_fib_algo()
1475 strlcpy(old_algo_name, fd->fd_flm->flm_name, in set_fib_algo()
1481 if (error != 0 || req->newptr == NULL) in set_fib_algo()
1522 return (set_fib_algo(curthread->td_proc->p_fibnum, AF_INET, oidp, req)); in set_algo_inet_sysctl_handler()
1534 return (set_fib_algo(curthread->td_proc->p_fibnum, AF_INET6, oidp, req)); in set_algo_inet6_sysctl_handler()
1566 fdh->fdh_num_tables = num_tables; in alloc_fib_dp_array()
1572 fdh->fdh_idx[i].f = dummy_lookup; in alloc_fib_dp_array()
1585 * Replace per-family index pool @pdp with a new one which
1597 curvnet, dp->f, dp->arg); in replace_rtables_family()
1602 if (old_fdh->fdh_idx[fd->fd_fibnum].f == dp->f) { in replace_rtables_family()
1605 * Perform in-line replace without reallocation. in replace_rtables_family()
1607 old_fdh->fdh_idx[fd->fd_fibnum].arg = dp->arg; in replace_rtables_family()
1613 new_fdh = alloc_fib_dp_array(old_fdh->fdh_num_tables, false); in replace_rtables_family()
1621 memcpy(&new_fdh->fdh_idx[0], &old_fdh->fdh_idx[0], in replace_rtables_family()
1622 old_fdh->fdh_num_tables * sizeof(struct fib_dp)); in replace_rtables_family()
1624 new_fdh->fdh_idx[fd->fd_fibnum] = *dp; in replace_rtables_family()
1629 *pdp = &new_fdh->fdh_idx[0]; in replace_rtables_family()
1631 FD_PRINTF(LOG_DEBUG, fd, "update %p -> %p", old_fdh, new_fdh); in replace_rtables_family()
1633 fib_epoch_call(destroy_fdh_epoch, &old_fdh->fdh_epoch_ctx); in replace_rtables_family()
1662 pdp = get_family_dp_ptr(fd->fd_family); in fib_set_datapath_ptr()
1680 memcpy(&new_fdh->fdh_idx[0], &old_fdh->fdh_idx[0], in grow_rtables_family()
1681 old_fdh->fdh_num_tables * sizeof(struct fib_dp)); in grow_rtables_family()
1687 *pdp = &new_fdh->fdh_idx[0]; in grow_rtables_family()
1691 fib_epoch_call(destroy_fdh_epoch, &old_fdh->fdh_epoch_ctx); in grow_rtables_family()
1695 * Grows per-AF arrays of datapath pointers for each supported family.
1715 rinfo->num_prefixes = rh->rnh_prefixes; in fib_get_rtable_info()
1716 rinfo->num_nhops = nhops_get_count(rh); in fib_get_rtable_info()
1718 rinfo->num_nhgrp = nhgrp_get_count(rh); in fib_get_rtable_info()
1728 RIB_WLOCK_ASSERT(fd->fd_rh); in fib_set_algo_ptr()
1730 fd->fd_algo_data = algo_data; in fib_set_algo_ptr()
1749 return (fd->fd_rh); in fib_get_rh()
1753 * Accessor to export idx->nhop array
1759 return (fd->nh_idx); in fib_get_nhop_array()
1784 return (fd->nh_ref_table->refcnt[index] == 0); in is_idx_free()
1792 if (idx >= fd->number_nhops) { in fib_ref_nhop()
1793 fd->hit_nhops = 1; in fib_ref_nhop()
1799 fd->nh_idx[idx] = nh; in fib_ref_nhop()
1800 fd->nh_ref_table->count++; in fib_ref_nhop()
1801 FD_PRINTF(LOG_DEBUG2, fd, " REF nhop %u %p", idx, fd->nh_idx[idx]); in fib_ref_nhop()
1803 fd->nh_ref_table->refcnt[idx]++; in fib_ref_nhop()
1819 nhop_free_any(nrd->nh); in release_nhop_epoch()
1837 nrd->nh = nh; in fib_schedule_release_nhop()
1838 fib_epoch_call(release_nhop_epoch, &nrd->ctx); in fib_schedule_release_nhop()
1853 KASSERT((idx < fd->number_nhops), ("invalid nhop index")); in fib_unref_nhop()
1854 KASSERT((nh == fd->nh_idx[idx]), ("index table contains whong nh")); in fib_unref_nhop()
1856 fd->nh_ref_table->refcnt[idx]--; in fib_unref_nhop()
1857 if (fd->nh_ref_table->refcnt[idx] == 0) { in fib_unref_nhop()
1858 FD_PRINTF(LOG_DEBUG, fd, " FREE nhop %d %p", idx, fd->nh_idx[idx]); in fib_unref_nhop()
1859 fib_schedule_release_nhop(fd, fd->nh_idx[idx]); in fib_unref_nhop()
1866 switch (rh->rib_family) { in set_algo_fixed()
1884 switch (rh->rib_family) { in is_algo_fixed()
1916 if (flm->flm_family != rh->rib_family) in fib_check_best_algo()
1919 preference = flm->flm_get_pref(&rinfo); in fib_check_best_algo()
1921 if (!flm_error_check(flm, rh->rib_fibnum)) { in fib_check_best_algo()
1930 best_flm->flm_refcount++; in fib_check_best_algo()
1936 candidate_algos, orig_flm ? orig_flm->flm_name : "NULL", curr_preference, in fib_check_best_algo()
1937 best_flm ? best_flm->flm_name : (orig_flm ? orig_flm->flm_name : "NULL"), in fib_check_best_algo()
1960 RH_PRINTF(LOG_INFO, rh, "selected algo %s", flm->flm_name); in fib_select_algo_initial()
1970 *dp = fd->fd_dp; in fib_select_algo_initial()
1972 RH_PRINTF(LOG_CRIT, rh, "unable to setup algo %s", flm->flm_name); in fib_select_algo_initial()
1980 * Sets up fib algo instances for the non-initialized RIBs in the @family.
1995 if (rh->rib_algo_init) in fib_setup_family()
1997 if (!fib_select_algo_initial(rh, &new_fdh->fdh_idx[i])) in fib_setup_family()
2000 rh->rib_algo_init = true; in fib_setup_family()
2009 if (new_fdh->fdh_idx[i].f == dummy_lookup) in fib_setup_family()
2010 new_fdh->fdh_idx[i] = old_fdh->fdh_idx[i]; in fib_setup_family()
2016 *pdp = &new_fdh->fdh_idx[0]; in fib_setup_family()
2020 fib_epoch_call(destroy_fdh_epoch, &old_fdh->fdh_epoch_ctx); in fib_setup_family()
2031 ALGO_PRINTF(LOG_INFO, "attaching %s to %s", flm->flm_name, in fib_module_register()
2032 print_family(flm->flm_family)); in fib_module_register()
2050 if (flm->flm_refcount > 0) { in fib_module_unregister()
2055 ALGO_PRINTF(LOG_INFO, "detaching %s from %s", flm->flm_name, in fib_module_unregister()
2056 print_family(flm->flm_family)); in fib_module_unregister()