Home
last modified time | relevance | path

Searched refs:wn_new (Results 1 – 3 of 3) sorted by relevance

/freebsd/sys/net/route/
H A Droute_helpers.c298 const struct weightened_nhop *wn_old, *wn_new; in decompose_change_notification() local
314 wn_new = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_new, &num_new); in decompose_change_notification()
318 wn_new = &tmp; in decompose_change_notification()
343 uint32_t nh_idx_new = wn_new[idx_new].nh->nh_priv->nh_idx; in decompose_change_notification()
346 if (wn_old[idx_old].weight != wn_new[idx_new].weight) { in decompose_change_notification()
349 notify_add(&rc_add, &wn_new[idx_new], cb, cbdata); in decompose_change_notification()
359 notify_add(&rc_add, &wn_new[idx_new], cb, cbdata); in decompose_change_notification()
370 notify_add(&rc_add, &wn_new[idx_new], cb, cbdata); in decompose_change_notification()
H A Droute_ctl.c1142 struct weightened_nhop *wn_new; in change_mpath_route() local
1161 wn_new = mallocarray(num_nhops, sizeof(struct weightened_nhop), in change_mpath_route()
1163 if (wn_new == NULL) { in change_mpath_route()
1168 memcpy(wn_new, wn, num_nhops * sizeof(struct weightened_nhop)); in change_mpath_route()
1169 wn_new[found_idx].nh = nh_new; in change_mpath_route()
1170 wn_new[found_idx].weight = get_info_weight(info, wn[found_idx].weight); in change_mpath_route()
1172 error = nhgrp_get_group(rnh, wn_new, num_nhops, 0, &rnd_new.rnd_nhgrp); in change_mpath_route()
1174 free(wn_new, M_TEMP); in change_mpath_route()
/freebsd/sys/netlink/route/
H A Dnexthop.c273 struct weightened_nhop *wn_new, wn_base[MAX_STACK_NHOPS]; in clone_unhop() local
306 wn_new = malloc(num_nhops * sizeof(struct weightened_nhop), M_TEMP, M_NOWAIT); in clone_unhop()
307 if (wn_new == NULL) in clone_unhop()
310 wn_new = wn_base; in clone_unhop()
315 wn_new[i].nh = nl_find_nhop(fibnum, family, uidx, nh_flags, &error); in clone_unhop()
318 wn_new[i].weight = wn[i].weight; in clone_unhop()
322 struct rib_head *rh = nhop_get_rh(wn_new[0].nh); in clone_unhop()
325 error = nhgrp_get_group(rh, wn_new, num_nhops, unhop->un_idx, &nhg); in clone_unhop()
329 if (wn_new != wn_base) in clone_unhop()
330 free(wn_new, M_TEMP); in clone_unhop()