Lines Matching defs:new

1332  * to verify this new spec works with ipv6
1334 static int fib6_check_nh_list(struct nexthop *old, struct nexthop *new,
1347 return fib6_check_nexthop(new, NULL, extack);
1410 static int fib_check_nh_list(struct nexthop *old, struct nexthop *new,
1418 err = fib_check_nexthop(new, fi->fib_scope, extack);
1491 * overweight nexthop. It needs to be migrated to a new nexthop if
1719 /* For NH group replacement, the new NHG might only have a stub
1784 /* copy old entries to new except the one getting removed */
1956 struct nexthop *new, const struct nh_config *cfg,
1965 if (!new->is_group) {
1971 newg = rtnl_dereference(new->nh_grp);
1979 err = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new,
2003 err = call_nexthop_res_table_notifiers(net, new, extack);
2035 oldg->nh_entries[i].nh_parent = new;
2037 rcu_assign_pointer(new->nh_grp, oldg);
2125 struct nexthop *new,
2133 if (new->is_group) {
2138 err = call_nexthop_notifiers(net, NEXTHOP_EVENT_REPLACE, new, extack);
2142 /* Hardware flags were set on 'old' as 'new' is not in the red-black
2143 * tree. Therefore, inherit the flags from 'old' to 'new'.
2145 new->nh_flags |= old->nh_flags & (RTNH_F_OFFLOAD | RTNH_F_TRAP);
2148 newi = rtnl_dereference(new->nh_info);
2151 oldi->nh_parent = new;
2156 old->protocol = new->protocol;
2157 old->nh_flags = new->nh_flags;
2160 rcu_assign_pointer(new->nh_info, oldi);
2188 rcu_assign_pointer(new->nh_info, newi);
2193 newi->nh_parent = new;
2244 struct nexthop *new, const struct nh_config *cfg,
2252 * new nexthop definition
2254 err = fib_check_nh_list(old, new, extack);
2258 err = fib6_check_nh_list(old, new, extack);
2262 if (!new->is_group) {
2263 struct nh_info *nhi = rtnl_dereference(new->nh_info);
2269 /* if new nexthop is a blackhole, any groups using this
2278 err = fib_check_nh_list(nhge->nh_parent, new, extack);
2282 err = fib6_check_nh_list(nhge->nh_parent, new, extack);
2288 err = replace_nexthop_grp(net, old, new, cfg, extack);
2290 err = replace_nexthop_single(net, old, new, extack);
2293 nh_rt_cache_flush(net, old, new);
2295 __remove_nexthop(net, new, NULL);
2296 nexthop_put(new);
2356 * replacing, but not when creating a new group.