• Home
  • Raw
  • Download

Lines Matching refs:nhc

644 static void update_or_create_fnhe(struct fib_nh_common *nhc, __be32 daddr,  in update_or_create_fnhe()  argument
655 genid = fnhe_genid(dev_net(nhc->nhc_dev)); in update_or_create_fnhe()
660 hash = rcu_dereference(nhc->nhc_exceptions); in update_or_create_fnhe()
665 rcu_assign_pointer(nhc->nhc_exceptions, hash); in update_or_create_fnhe()
724 rt = rcu_dereference(nhc->nhc_rth_input); in update_or_create_fnhe()
731 prt = per_cpu_ptr(nhc->nhc_pcpu_rth_output, i); in update_or_create_fnhe()
797 struct fib_nh_common *nhc; in __ip_do_redirect() local
800 nhc = FIB_RES_NHC(res); in __ip_do_redirect()
801 update_or_create_fnhe(nhc, fl4->daddr, new_gw, in __ip_do_redirect()
1050 struct fib_nh_common *nhc; in __ip_rt_update_pmtu() local
1053 nhc = FIB_RES_NHC(res); in __ip_rt_update_pmtu()
1054 update_or_create_fnhe(nhc, fl4->daddr, 0, mtu, lock, in __ip_rt_update_pmtu()
1336 static void ip_del_fnhe(struct fib_nh_common *nhc, __be32 daddr) in ip_del_fnhe() argument
1344 hash = rcu_dereference_protected(nhc->nhc_exceptions, in ip_del_fnhe()
1370 static struct fib_nh_exception *find_exception(struct fib_nh_common *nhc, in find_exception() argument
1373 struct fnhe_hash_bucket *hash = rcu_dereference(nhc->nhc_exceptions); in find_exception()
1387 ip_del_fnhe(nhc, daddr); in find_exception()
1404 struct fib_nh_common *nhc = res->nhc; in ip_mtu_from_fib_result() local
1405 struct net_device *dev = nhc->nhc_dev; in ip_mtu_from_fib_result()
1416 fnhe = find_exception(nhc, daddr); in ip_mtu_from_fib_result()
1424 return mtu - lwtunnel_headroom(nhc->nhc_lwtstate, mtu); in ip_mtu_from_fib_result()
1477 static bool rt_cache_route(struct fib_nh_common *nhc, struct rtable *rt) in rt_cache_route() argument
1483 p = (struct rtable **)&nhc->nhc_rth_input; in rt_cache_route()
1485 p = (struct rtable **)raw_cpu_ptr(nhc->nhc_pcpu_rth_output); in rt_cache_route()
1580 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in rt_set_nexthop() local
1582 if (nhc->nhc_gw_family && nhc->nhc_scope == RT_SCOPE_LINK) { in rt_set_nexthop()
1584 rt->rt_gw_family = nhc->nhc_gw_family; in rt_set_nexthop()
1586 if (likely(nhc->nhc_gw_family == AF_INET)) in rt_set_nexthop()
1587 rt->rt_gw4 = nhc->nhc_gw.ipv4; in rt_set_nexthop()
1589 rt->rt_gw6 = nhc->nhc_gw.ipv6; in rt_set_nexthop()
1595 if (nhc->nhc_family == AF_INET) { in rt_set_nexthop()
1598 nh = container_of(nhc, struct fib_nh, nh_common); in rt_set_nexthop()
1602 rt->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate); in rt_set_nexthop()
1606 cached = rt_cache_route(nhc, rt); in rt_set_nexthop()
1801 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in __mkroute_input() local
1802 struct net_device *dev = nhc->nhc_dev; in __mkroute_input()
1831 gw = nhc->nhc_gw_family == AF_INET ? nhc->nhc_gw.ipv4 : 0; in __mkroute_input()
1856 fnhe = find_exception(nhc, daddr); in __mkroute_input()
1861 rth = rcu_dereference(nhc->nhc_rth_input); in __mkroute_input()
2208 struct fib_nh_common *nhc = res->fi ? res->nhc : NULL; in ip_rt_get_dev() local
2211 if (nhc) in ip_rt_get_dev()
2212 dev = l3mdev_master_dev_rcu(nhc->nhc_dev); in ip_rt_get_dev()
2368 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in ip_route_input_slow() local
2370 rth = rcu_dereference(nhc->nhc_rth_input); in ip_route_input_slow()
2398 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in ip_route_input_slow() local
2400 rth->dst.lwtstate = lwtstate_get(nhc->nhc_lwtstate); in ip_route_input_slow()
2407 if (unlikely(!rt_cache_route(nhc, rth))) in ip_route_input_slow()
2578 struct fib_nh_common *nhc = FIB_RES_NHC(*res); in __mkroute_output() local
2581 fnhe = find_exception(nhc, fl4->daddr); in __mkroute_output()
2589 !(nhc->nhc_gw_family && in __mkroute_output()
2590 nhc->nhc_scope == RT_SCOPE_LINK))) { in __mkroute_output()
2594 prth = raw_cpu_ptr(nhc->nhc_pcpu_rth_output); in __mkroute_output()
3140 struct fib_nh_common *nhc = fib_info_nhc(fi, nhsel); in fib_dump_info_fnhe() local
3144 if (nhc->nhc_flags & RTNH_F_DEAD) in fib_dump_info_fnhe()
3148 bucket = rcu_dereference(nhc->nhc_exceptions); in fib_dump_info_fnhe()