| /linux/net/ipv4/ |
| H A D | fib_semantics.c | 155 static void free_nh_exceptions(struct fib_nh_common *nhc) in free_nh_exceptions() argument 160 hash = rcu_dereference_protected(nhc->nhc_exceptions, 1); in free_nh_exceptions() 202 void fib_nh_common_release(struct fib_nh_common *nhc) in fib_nh_common_release() argument 204 netdev_put(nhc->nhc_dev, &nhc->nhc_dev_tracker); in fib_nh_common_release() 205 lwtstate_put(nhc->nhc_lwtstate); in fib_nh_common_release() 206 rt_fibinfo_free_cpus(nhc->nhc_pcpu_rth_output); in fib_nh_common_release() 207 rt_fibinfo_free(&nhc->nhc_rth_input); in fib_nh_common_release() 208 free_nh_exceptions(nhc); in fib_nh_common_release() 493 static size_t fib_nexthop_nlmsg_size(const struct fib_nh_common *nhc, in fib_nexthop_nlmsg_size() argument 498 switch (nhc->nhc_gw_family) { in fib_nexthop_nlmsg_size() [all …]
|
| H A D | route.c | 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() 826 struct fib_nh_common *nhc; in __ip_do_redirect() local 829 nhc = FIB_RES_NHC(res); in __ip_do_redirect() 830 update_or_create_fnhe(nhc, fl4->daddr, new_gw, in __ip_do_redirect() 1076 struct fib_nh_common *nhc; in __ip_rt_update_pmtu() local 1379 ip_del_fnhe(struct fib_nh_common * nhc,__be32 daddr) ip_del_fnhe() argument 1413 find_exception(struct fib_nh_common * nhc,__be32 daddr) find_exception() argument 1447 struct fib_nh_common *nhc = res->nhc; ip_mtu_from_fib_result() local 1520 rt_cache_route(struct fib_nh_common * nhc,struct rtable * rt) rt_cache_route() argument 1625 struct fib_nh_common *nhc = FIB_RES_NHC(*res); rt_set_nexthop() local 1846 struct fib_nh_common *nhc = FIB_RES_NHC(*res); __mkroute_input() local 2269 struct fib_nh_common *nhc = res->fi ? res->nhc : NULL; ip_rt_get_dev() local 2448 struct fib_nh_common *nhc = FIB_RES_NHC(*res); ip_route_input_slow() local 2477 struct fib_nh_common *nhc = FIB_RES_NHC(*res); ip_route_input_slow() local 2660 struct fib_nh_common *nhc = FIB_RES_NHC(*res); __mkroute_output() local 3167 struct fib_nh_common *nhc = fib_info_nhc(fi, nhsel); fib_dump_info_fnhe() local [all...] |
| H A D | fib_trie.c | 1402 bool fib_lookup_good_nhc(const struct fib_nh_common *nhc, int fib_flags, in fib_lookup_good_nhc() argument 1405 if (nhc->nhc_flags & RTNH_F_DEAD) in fib_lookup_good_nhc() 1408 if (ip_ignore_linkdown(nhc->nhc_dev) && in fib_lookup_good_nhc() 1409 nhc->nhc_flags & RTNH_F_LINKDOWN && in fib_lookup_good_nhc() 1413 if (flp->flowi4_oif && flp->flowi4_oif != nhc->nhc_oif) in fib_lookup_good_nhc() 1551 struct fib_nh_common *nhc; in fib_table_lookup() local 1584 nhc = nexthop_get_nhc_lookup(fi->nh, fib_flags, flp, in fib_table_lookup() 1586 if (nhc) in fib_table_lookup() 1592 nhc = fib_info_nhc(fi, nhsel); in fib_table_lookup() 1594 if (!fib_lookup_good_nhc(nhc, fib_flags, flp)) in fib_table_lookup() [all …]
|
| H A D | fib_rules.c | 155 struct fib_nh_common *nhc = fib_info_nhc(result->fi, 0); in fib4_rule_suppress() local 157 dev = nhc->nhc_dev; in fib4_rule_suppress()
|
| H A D | fib_frontend.c | 247 struct fib_nh_common *nhc = fib_info_nhc(res.fi, 0); in __inet_dev_addr_type() local 249 if (!dev || dev == nhc->nhc_dev) in __inet_dev_addr_type() 340 const struct fib_nh_common *nhc = fib_info_nhc(fi, ret); in fib_info_nh_uses_dev() local 342 if (nhc_l3mdev_matches_dev(nhc, dev)) { in fib_info_nh_uses_dev()
|
| /linux/include/net/ |
| H A D | ip_fib.h | 181 struct fib_nh_common *nhc; member 208 __be32 fib_info_update_nhc_saddr(struct net *net, struct fib_nh_common *nhc, 212 #define FIB_RES_NHC(res) ((res).nhc) 481 static inline bool nhc_l3mdev_matches_dev(const struct fib_nh_common *nhc, in nhc_l3mdev_matches_dev() argument 484 if (nhc->nhc_dev == dev || in nhc_l3mdev_matches_dev() 485 l3mdev_master_ifindex_rcu(nhc->nhc_dev) == dev->ifindex) in nhc_l3mdev_matches_dev() 497 void fib_nhc_update_mtu(struct fib_nh_common *nhc, u32 new, u32 orig); 585 int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc, 589 void fib_nh_common_release(struct fib_nh_common *nhc); 595 bool fib_lookup_good_nhc(const struct fib_nh_common *nhc, int fib_flags, [all …]
|
| H A D | vxlan.h | 566 struct fib_nh_common *nhc; in vxlan_fdb_nh_path_select() local 569 nhc = nexthop_path_fdb_result(nh, hash >> 1, &dst_port); in vxlan_fdb_nh_path_select() 570 if (unlikely(!nhc)) in vxlan_fdb_nh_path_select() 573 switch (nhc->nhc_gw_family) { in vxlan_fdb_nh_path_select() 575 rdst->remote_ip.sin.sin_addr.s_addr = nhc->nhc_gw.ipv4; in vxlan_fdb_nh_path_select() 579 rdst->remote_ip.sin6.sin6_addr = nhc->nhc_gw.ipv6; in vxlan_fdb_nh_path_select()
|
| H A D | nexthop.h | 359 struct fib_nh_common *nhc = &nhi->fib_nhc; in nexthop_mpath_fill_node() local 362 if (fib_add_nexthop(skb, nhc, weight, rt_family, 0) < 0) in nexthop_mpath_fill_node() 395 res->nhc = &nhi->fib_nhc; in nexthop_path_fib_result()
|
| /linux/drivers/net/ethernet/marvell/prestera/ |
| H A D | prestera_router.c | 107 struct fib_nh_common *nhc, in prestera_util_nhc2nc_key() argument 111 if (nhc->nhc_gw_family == AF_INET) { in prestera_util_nhc2nc_key() 113 nk->addr.u.ipv4 = nhc->nhc_gw.ipv4; in prestera_util_nhc2nc_key() 116 nk->addr.u.ipv6 = nhc->nhc_gw.ipv6; in prestera_util_nhc2nc_key() 119 nk->dev = nhc->nhc_dev; in prestera_util_nhc2nc_key() 134 struct fib_nh_common *nhc, in prestera_util_nhc_eq_n_cache_key() argument 140 err = prestera_util_nhc2nc_key(sw, nhc, &tk); in prestera_util_nhc_eq_n_cache_key() 304 prestera_util_kern_set_nh_offload(struct fib_nh_common *nhc, bool offloaded, bool trap) in prestera_util_kern_set_nh_offload() argument 307 nhc->nhc_flags |= RTNH_F_OFFLOAD; in prestera_util_kern_set_nh_offload() 309 nhc->nhc_flags &= ~RTNH_F_OFFLOAD; in prestera_util_kern_set_nh_offload() [all …]
|
| /linux/net/6lowpan/ |
| H A D | nhc.h | 119 int lowpan_nhc_add(const struct lowpan_nhc *nhc); 126 void lowpan_nhc_del(const struct lowpan_nhc *nhc);
|
| H A D | Makefile | 4 6lowpan-y := core.o iphc.o nhc.o ndisc.o
|
| /linux/net/core/ |
| H A D | filter.c | 6356 struct fib_nh_common *nhc; in bpf_ipv4_fib_lookup() local 6456 nhc = res.nhc; in bpf_ipv4_fib_lookup() 6459 if (nhc->nhc_lwtstate) in bpf_ipv4_fib_lookup() 6462 dev = nhc->nhc_dev; in bpf_ipv4_fib_lookup() 6473 if (likely(nhc->nhc_gw_family != AF_INET6)) { in bpf_ipv4_fib_lookup() 6474 if (nhc->nhc_gw_family) in bpf_ipv4_fib_lookup() 6475 params->ipv4_dst = nhc->nhc_gw.ipv4; in bpf_ipv4_fib_lookup() 6480 *dst = nhc->nhc_gw.ipv6; in bpf_ipv4_fib_lookup() 6486 if (likely(nhc->nhc_gw_family != AF_INET6)) in bpf_ipv4_fib_lookup()
|