Lines Matching defs:old

1559 static int fib6_check_nh_list(struct nexthop *old, struct nexthop *new,
1564 if (list_empty(&old->f6i_list))
1567 list_for_each_entry(f6i, &old->f6i_list, nh_list) {
1635 static int fib_check_nh_list(struct nexthop *old, struct nexthop *new,
1640 list_for_each_entry(fi, &old->fi_list, nh_list) {
2009 /* copy old entries to new except the one getting removed */
2166 /* if an IPv6 group was replaced, we have to release all old
2182 static int replace_nexthop_grp(struct net *net, struct nexthop *old,
2197 oldg = rtnl_dereference(old->nh_grp);
2249 newg->nh_entries[i].nh_parent = old;
2251 rcu_assign_pointer(old->nh_grp, newg);
2288 struct nexthop *old,
2302 if (nhge->nh == old) {
2320 if (nhge->nh == old)
2330 struct nexthop *old,
2344 old, oldi, newi,
2351 static int replace_nexthop_single(struct net *net, struct nexthop *old,
2369 /* Hardware flags were set on 'old' as 'new' is not in the red-black
2370 * tree. Therefore, inherit the flags from 'old' to 'new'.
2372 new->nh_flags |= old->nh_flags & (RTNH_F_OFFLOAD | RTNH_F_TRAP);
2374 oldi = rtnl_dereference(old->nh_info);
2377 newi->nh_parent = old;
2380 old_protocol = old->protocol;
2381 old_nh_flags = old->nh_flags;
2383 old->protocol = new->protocol;
2384 old->nh_flags = new->nh_flags;
2386 rcu_assign_pointer(old->nh_info, newi);
2390 list_for_each_entry(nhge, &old->grp_list, nh_list) {
2393 err = replace_nexthop_single_notify(net, nhp, old, oldi, newi,
2403 list_for_each_entry(nhge, &old->grp_list, nh_list) {
2416 rcu_assign_pointer(old->nh_info, oldi);
2417 old->nh_flags = old_nh_flags;
2418 old->protocol = old_protocol;
2419 oldi->nh_parent = old;
2421 list_for_each_entry_continue_reverse(nhge, &old->grp_list, nh_list) {
2424 replace_nexthop_single_notify(net, nhp, old, newi, oldi, NULL);
2426 call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, old, extack);
2470 static int replace_nexthop(struct net *net, struct nexthop *old,
2481 err = fib_check_nh_list(old, new, extack);
2485 err = fib6_check_nh_list(old, new, extack);
2495 list_for_each_entry(nhge, &old->grp_list, nh_list) {
2514 if (old->is_group)
2515 err = replace_nexthop_grp(net, old, new, cfg, extack);
2517 err = replace_nexthop_single(net, old, new, extack);
2520 nh_rt_cache_flush(net, old, new);
2559 new_nh = nh; /* send notification with old nh */