Lines Matching refs:nh
621 static void update_or_create_fnhe(struct fib_nh *nh, __be32 daddr, __be32 gw, in update_or_create_fnhe() argument
633 hash = rcu_dereference(nh->nh_exceptions); in update_or_create_fnhe()
638 rcu_assign_pointer(nh->nh_exceptions, hash); in update_or_create_fnhe()
676 fnhe->fnhe_genid = fnhe_genid(dev_net(nh->nh_dev)); in update_or_create_fnhe()
686 rt = rcu_dereference(nh->nh_rth_input); in update_or_create_fnhe()
692 prt = per_cpu_ptr(nh->nh_pcpu_rth_output, i); in update_or_create_fnhe()
756 struct fib_nh *nh = &FIB_RES_NH(res); in __ip_do_redirect() local
758 update_or_create_fnhe(nh, fl4->daddr, new_gw, in __ip_do_redirect()
987 struct fib_nh *nh = &FIB_RES_NH(res); in __ip_rt_update_pmtu() local
989 update_or_create_fnhe(nh, fl4->daddr, 0, mtu, in __ip_rt_update_pmtu()
1252 static struct fib_nh_exception *find_exception(struct fib_nh *nh, __be32 daddr) in find_exception() argument
1254 struct fnhe_hash_bucket *hash = rcu_dereference(nh->nh_exceptions); in find_exception()
1315 static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt) in rt_cache_route() argument
1321 p = (struct rtable **)&nh->nh_rth_input; in rt_cache_route()
1323 p = (struct rtable **)raw_cpu_ptr(nh->nh_pcpu_rth_output); in rt_cache_route()
1404 struct fib_nh *nh = &FIB_RES_NH(*res); in rt_set_nexthop() local
1406 if (nh->nh_gw && nh->nh_scope == RT_SCOPE_LINK) { in rt_set_nexthop()
1407 rt->rt_gateway = nh->nh_gw; in rt_set_nexthop()
1412 rt->dst.tclassid = nh->nh_tclassid; in rt_set_nexthop()
1414 rt->dst.lwtstate = lwtstate_get(nh->nh_lwtstate); in rt_set_nexthop()
1418 cached = rt_cache_route(nh, rt); in rt_set_nexthop()
1560 static void ip_del_fnhe(struct fib_nh *nh, __be32 daddr) in ip_del_fnhe() argument
1568 hash = rcu_dereference_protected(nh->nh_exceptions, in ip_del_fnhe()
2066 struct fib_nh *nh = &FIB_RES_NH(*res); in __mkroute_output() local
2068 fnhe = find_exception(nh, fl4->daddr); in __mkroute_output()
2074 ip_del_fnhe(nh, fl4->daddr); in __mkroute_output()
2083 !(nh->nh_gw && in __mkroute_output()
2084 nh->nh_scope == RT_SCOPE_LINK))) { in __mkroute_output()
2088 prth = raw_cpu_ptr(nh->nh_pcpu_rth_output); in __mkroute_output()