Home
last modified time | relevance | path

Searched refs:fib6_nh (Results 1 – 14 of 14) sorted by relevance

/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dbpf_iter_ipv6_route.c17 struct fib6_nh *fib6_nh; in dump_ipv6_route() local
24 fib6_nh = &rt->fib6_nh[0]; in dump_ipv6_route()
30 fib6_nh = &nh->nh_info->fib6_nh; in dump_ipv6_route()
40 if (fib6_nh->fib_nh_gw_family) { in dump_ipv6_route()
42 BPF_SEQ_PRINTF(seq, "%pi6 ", &fib6_nh->fib_nh_gw6); in dump_ipv6_route()
47 dev = fib6_nh->fib_nh_dev; in dump_ipv6_route()
/openbmc/linux/include/net/
H A Dipv6_stubs.h15 struct fib6_nh;
46 int (*fib6_nh_init)(struct net *net, struct fib6_nh *fib6_nh,
49 void (*fib6_nh_release)(struct fib6_nh *fib6_nh);
50 void (*fib6_nh_release_dsts)(struct fib6_nh *fib6_nh);
H A Dnexthop.h68 struct fib6_nh fib6_nh; member
371 BUILD_BUG_ON(offsetof(struct fib6_nh, nh_common) != 0); in nexthop_fib_nhc()
480 static inline struct fib6_nh *nexthop_fib6_nh(struct nexthop *nh) in nexthop_fib6_nh()
495 return &nhi->fib6_nh; in nexthop_fib6_nh()
502 struct fib6_nh *fib6_nh; in fib6_info_nh_dev() local
504 fib6_nh = f6i->nh ? nexthop_fib6_nh(f6i->nh) : f6i->fib6_nh; in fib6_info_nh_dev()
505 return fib6_nh->fib_nh_dev; in fib6_info_nh_dev()
521 res->nh = &nhi->fib6_nh; in nexthop_path_fib6_result()
526 int (*cb)(struct fib6_nh *nh, void *arg),
H A Dip6_fib.h153 struct fib6_nh { struct
206 struct fib6_nh fib6_nh[]; member
225 struct fib6_nh *nh;
482 int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
485 void fib6_nh_release(struct fib6_nh *fib6_nh);
486 void fib6_nh_release_dsts(struct fib6_nh *fib6_nh);
H A Dip6_route.h78 f6i->fib6_nh->fib_nh_gw_family; in rt6_qualify_for_ecmp()
310 struct fib6_nh *nha, *nhb; in rt6_duplicate_nexthop()
315 nha = a->fib6_nh; in rt6_duplicate_nexthop()
316 nhb = b->fib6_nh; in rt6_duplicate_nexthop()
/openbmc/linux/net/ipv6/
H A Droute.c107 static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif,
445 if (fl6->mp_hash <= atomic_read(&match->fib6_nh->fib_nh_upper_bound)) in fib6_select_path()
450 const struct fib6_nh *nh = sibling->fib6_nh; in fib6_select_path()
464 res->nh = match->fib6_nh; in fib6_select_path()
471 static bool __rt6_device_match(struct net *net, const struct fib6_nh *nh, in __rt6_device_match()
497 struct fib6_nh *nh;
500 static int __rt6_nh_dev_match(struct fib6_nh *nh, void *_arg) in __rt6_nh_dev_match()
510 static struct fib6_nh *rt6_nh_dev_match(struct net *net, struct nexthop *nh, in rt6_nh_dev_match()
536 struct fib6_nh *nh; in rt6_device_match()
544 nh = f6i->fib6_nh; in rt6_device_match()
[all …]
H A Dip6_fib.c153 sz += sizeof(struct fib6_nh); in fib6_info_alloc()
175 fib6_nh_release(f6i->fib6_nh); in fib6_info_destroy_rcu()
955 static void __fib6_drop_pcpu_from(struct fib6_nh *fib6_nh, in __fib6_drop_pcpu_from() argument
961 if (!fib6_nh->rt6i_pcpu) in __fib6_drop_pcpu_from()
972 ppcpu_rt = per_cpu_ptr(fib6_nh->rt6i_pcpu, cpu); in __fib6_drop_pcpu_from()
997 static int fib6_nh_drop_pcpu_from(struct fib6_nh *nh, void *_arg) in fib6_nh_drop_pcpu_from()
1023 struct fib6_nh *fib6_nh; in fib6_drop_pcpu_from() local
1025 fib6_nh = f6i->fib6_nh; in fib6_drop_pcpu_from()
1026 __fib6_drop_pcpu_from(fib6_nh, f6i, table); in fib6_drop_pcpu_from()
2492 struct fib6_nh *fib6_nh = rt->fib6_nh; in ipv6_route_native_seq_show() local
[all …]
H A Daddrconf_core.c180 static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, in eafnosupport_fib6_nh_init() argument
H A Dndisc.c1361 neigh = ip6_neigh_lookup(&rt->fib6_nh->fib_nh_gw6, in ndisc_router_discovery()
1362 rt->fib6_nh->fib_nh_dev, NULL, in ndisc_router_discovery()
1397 neigh = ip6_neigh_lookup(&rt->fib6_nh->fib_nh_gw6, in ndisc_router_discovery()
1398 rt->fib6_nh->fib_nh_dev, NULL, in ndisc_router_discovery()
H A Daddrconf.c2476 /* prefix routes only use builtin fib6_nh */ in addrconf_get_prefix_route()
2480 if (rt->fib6_nh->fib_nh_dev->ifindex != dev->ifindex) in addrconf_get_prefix_route()
2482 if (no_gw && rt->fib6_nh->fib_nh_gw_family) in addrconf_get_prefix_route()
6621 /* host routes only use builtin fib6_nh */ in addrconf_disable_policy_idev()
6622 struct fib6_nh *nh = ifa->rt->fib6_nh; in addrconf_disable_policy_idev()
/openbmc/linux/net/ipv4/
H A Dnexthop.c499 ipv6_stub->fib6_nh_release(&nhi->fib6_nh); in nexthop_free_single()
697 struct fib6_nh *fib6_nh; in nh_fill_node() local
754 fib6_nh = &nhi->fib6_nh; in nh_fill_node()
755 if (fib6_nh->fib_nh_gw_family && in nh_fill_node()
756 nla_put_in6_addr(skb, NHA_GATEWAY, &fib6_nh->fib_nh_gw6)) in nh_fill_node()
815 if (nhi->fib6_nh.fib_nh_gw_family) in nh_nlmsg_size_single()
1123 static bool ipv6_good_nh(const struct fib6_nh *nh) in ipv6_good_nh()
1164 return ipv6_good_nh(&nhi->fib6_nh); in nexthop_is_good_nh()
1251 int (*cb)(struct fib6_nh *nh, void *arg), in nexthop_for_each_fib6_nh()
1266 err = cb(&nhi->fib6_nh, arg); in nexthop_for_each_fib6_nh()
[all …]
H A Dfib_semantics.c1060 struct fib6_nh fib6_nh = {}; in fib_check_nh_v6_gw() local
1063 err = ipv6_stub->fib6_nh_init(net, &fib6_nh, &cfg, GFP_KERNEL, extack); in fib_check_nh_v6_gw()
1065 nh->fib_nh_dev = fib6_nh.fib_nh_dev; in fib_check_nh_v6_gw()
1071 ipv6_stub->fib6_nh_release(&fib6_nh); in fib_check_nh_v6_gw()
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_router.c3392 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in mlxsw_sp_nexthop6_group_cmp() local
3396 ifindex = fib6_nh->fib_nh_dev->ifindex; in mlxsw_sp_nexthop6_group_cmp()
3397 weight = fib6_nh->fib_nh_weight; in mlxsw_sp_nexthop6_group_cmp()
3398 gw = &fib6_nh->fib_nh_gw6; in mlxsw_sp_nexthop6_group_cmp()
3465 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in mlxsw_sp_nexthop6_group_hash() local
3466 struct net_device *dev = fib6_nh->fib_nh_dev; in mlxsw_sp_nexthop6_group_hash()
3467 struct in6_addr *gw = &fib6_nh->fib_nh_gw6; in mlxsw_sp_nexthop6_group_hash()
3946 struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; in __mlxsw_sp_nexthop6_group_offload_refresh() local
3951 fib6_nh->fib_nh_flags |= RTNH_F_OFFLOAD; in __mlxsw_sp_nexthop6_group_offload_refresh()
3953 fib6_nh->fib_nh_flags &= ~RTNH_F_OFFLOAD; in __mlxsw_sp_nexthop6_group_offload_refresh()
[all …]
/openbmc/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_router.c198 if (!fi->fib6_nh->nh_common.nhc_gw_family) in __prestera_fi6_is_direct()
332 return &fen6_info->rt->fib6_nh->nh_common; in prestera_kern_fib_info_nhc()
337 return &iter->fib6_nh->nh_common; in prestera_kern_fib_info_nhc()