Lines Matching refs:rth

400 static inline bool rt_is_expired(const struct rtable *rth)  in rt_is_expired()  argument
402 return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev)); in rt_is_expired()
1716 struct rtable *rth; in ip_route_input_mc() local
1727 rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST, in ip_route_input_mc()
1729 if (!rth) in ip_route_input_mc()
1733 rth->dst.tclassid = itag; in ip_route_input_mc()
1735 rth->dst.output = ip_rt_bug; in ip_route_input_mc()
1736 rth->rt_is_input= 1; in ip_route_input_mc()
1740 rth->dst.input = ip_mr_input; in ip_route_input_mc()
1744 skb_dst_set(skb, &rth->dst); in ip_route_input_mc()
1783 struct rtable *rth; in __mkroute_input() local
1834 rth = rcu_dereference(fnhe->fnhe_rth_input); in __mkroute_input()
1836 rth = rcu_dereference(nhc->nhc_rth_input); in __mkroute_input()
1837 if (rt_cache_valid(rth)) { in __mkroute_input()
1838 skb_dst_set_noref(skb, &rth->dst); in __mkroute_input()
1843 rth = rt_dst_alloc(out_dev->dev, 0, res->type, in __mkroute_input()
1846 if (!rth) { in __mkroute_input()
1851 rth->rt_is_input = 1; in __mkroute_input()
1854 rth->dst.input = ip_forward; in __mkroute_input()
1856 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag, in __mkroute_input()
1858 lwtunnel_set_redirect(&rth->dst); in __mkroute_input()
1859 skb_dst_set(skb, &rth->dst); in __mkroute_input()
2216 struct rtable *rth; in ip_route_input_slow() local
2340 rth = rcu_dereference(nhc->nhc_rth_input); in ip_route_input_slow()
2341 if (rt_cache_valid(rth)) { in ip_route_input_slow()
2342 skb_dst_set_noref(skb, &rth->dst); in ip_route_input_slow()
2348 rth = rt_dst_alloc(ip_rt_get_dev(net, res), in ip_route_input_slow()
2351 if (!rth) in ip_route_input_slow()
2354 rth->dst.output= ip_rt_bug; in ip_route_input_slow()
2356 rth->dst.tclassid = itag; in ip_route_input_slow()
2358 rth->rt_is_input = 1; in ip_route_input_slow()
2362 rth->dst.input= ip_error; in ip_route_input_slow()
2363 rth->dst.error= -err; in ip_route_input_slow()
2364 rth->rt_flags &= ~RTCF_LOCAL; in ip_route_input_slow()
2370 rth->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate); in ip_route_input_slow()
2371 if (lwtunnel_input_redirect(rth->dst.lwtstate)) { in ip_route_input_slow()
2372 WARN_ON(rth->dst.input == lwtunnel_input); in ip_route_input_slow()
2373 rth->dst.lwtstate->orig_input = rth->dst.input; in ip_route_input_slow()
2374 rth->dst.input = lwtunnel_input; in ip_route_input_slow()
2377 if (unlikely(!rt_cache_route(nhc, rth))) in ip_route_input_slow()
2378 rt_add_uncached_list(rth); in ip_route_input_slow()
2380 skb_dst_set(skb, &rth->dst); in ip_route_input_slow()
2491 struct rtable *rth; in __mkroute_output() local
2566 rth = rcu_dereference(*prth); in __mkroute_output()
2567 if (rt_cache_valid(rth) && dst_hold_safe(&rth->dst)) in __mkroute_output()
2568 return rth; in __mkroute_output()
2572 rth = rt_dst_alloc(dev_out, flags, type, in __mkroute_output()
2575 if (!rth) in __mkroute_output()
2578 rth->rt_iif = orig_oif; in __mkroute_output()
2585 rth->dst.output = ip_mc_output; in __mkroute_output()
2592 rth->dst.input = ip_mr_input; in __mkroute_output()
2593 rth->dst.output = ip_mc_output; in __mkroute_output()
2599 rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0, do_cache); in __mkroute_output()
2600 lwtunnel_set_redirect(&rth->dst); in __mkroute_output()
2602 return rth; in __mkroute_output()
2619 struct rtable *rth; in ip_route_output_key_hash() local
2627 rth = ip_route_output_key_hash_rcu(net, fl4, &res, skb); in ip_route_output_key_hash()
2630 return rth; in ip_route_output_key_hash()
2641 struct rtable *rth; in ip_route_output_key_hash_rcu() local
2648 rth = ERR_PTR(-EINVAL); in ip_route_output_key_hash_rcu()
2652 rth = ERR_PTR(-ENETUNREACH); in ip_route_output_key_hash_rcu()
2699 rth = ERR_PTR(-ENODEV); in ip_route_output_key_hash_rcu()
2705 rth = ERR_PTR(-ENETUNREACH); in ip_route_output_key_hash_rcu()
2768 rth = ERR_PTR(err); in ip_route_output_key_hash_rcu()
2799 rth = __mkroute_output(res, fl4, orig_oif, dev_out, flags); in ip_route_output_key_hash_rcu()
2802 return rth; in ip_route_output_key_hash_rcu()