Lines Matching refs:nh
635 static void update_or_create_fnhe(struct fib_nh *nh, __be32 daddr, __be32 gw, in update_or_create_fnhe() argument
645 genid = fnhe_genid(dev_net(nh->nh_dev)); in update_or_create_fnhe()
650 hash = rcu_dereference(nh->nh_exceptions); in update_or_create_fnhe()
655 rcu_assign_pointer(nh->nh_exceptions, hash); in update_or_create_fnhe()
707 rt = rcu_dereference(nh->nh_rth_input); in update_or_create_fnhe()
713 prt = per_cpu_ptr(nh->nh_pcpu_rth_output, i); in update_or_create_fnhe()
779 struct fib_nh *nh = &FIB_RES_NH(res); in __ip_do_redirect() local
781 update_or_create_fnhe(nh, fl4->daddr, new_gw, in __ip_do_redirect()
1025 struct fib_nh *nh = &FIB_RES_NH(res); in __ip_rt_update_pmtu() local
1027 update_or_create_fnhe(nh, fl4->daddr, 0, mtu, lock, in __ip_rt_update_pmtu()
1290 static void ip_del_fnhe(struct fib_nh *nh, __be32 daddr) in ip_del_fnhe() argument
1298 hash = rcu_dereference_protected(nh->nh_exceptions, in ip_del_fnhe()
1320 static struct fib_nh_exception *find_exception(struct fib_nh *nh, __be32 daddr) in find_exception() argument
1322 struct fnhe_hash_bucket *hash = rcu_dereference(nh->nh_exceptions); in find_exception()
1336 ip_del_fnhe(nh, daddr); in find_exception()
1354 struct fib_nh *nh = &fi->fib_nh[res->nh_sel]; in ip_mtu_from_fib_result() local
1355 struct net_device *dev = nh->nh_dev; in ip_mtu_from_fib_result()
1365 fnhe = find_exception(nh, daddr); in ip_mtu_from_fib_result()
1373 return mtu - lwtunnel_headroom(nh->nh_lwtstate, mtu); in ip_mtu_from_fib_result()
1424 static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt) in rt_cache_route() argument
1430 p = (struct rtable **)&nh->nh_rth_input; in rt_cache_route()
1432 p = (struct rtable **)raw_cpu_ptr(nh->nh_pcpu_rth_output); in rt_cache_route()
1531 struct fib_nh *nh = &FIB_RES_NH(*res); in rt_set_nexthop() local
1533 if (nh->nh_gw && nh->nh_scope == RT_SCOPE_LINK) { in rt_set_nexthop()
1534 rt->rt_gateway = nh->nh_gw; in rt_set_nexthop()
1543 rt->dst.tclassid = nh->nh_tclassid; in rt_set_nexthop()
1545 rt->dst.lwtstate = lwtstate_get(nh->nh_lwtstate); in rt_set_nexthop()
1549 cached = rt_cache_route(nh, rt); in rt_set_nexthop()
2073 struct fib_nh *nh = &FIB_RES_NH(*res); in ip_route_input_slow() local
2075 rth->dst.lwtstate = lwtstate_get(nh->nh_lwtstate); in ip_route_input_slow()
2082 if (unlikely(!rt_cache_route(nh, rth))) in ip_route_input_slow()
2253 struct fib_nh *nh = &FIB_RES_NH(*res); in __mkroute_output() local
2255 fnhe = find_exception(nh, fl4->daddr); in __mkroute_output()
2263 !(nh->nh_gw && in __mkroute_output()
2264 nh->nh_scope == RT_SCOPE_LINK))) { in __mkroute_output()
2268 prth = raw_cpu_ptr(nh->nh_pcpu_rth_output); in __mkroute_output()