/net/decnet/ |
D | dn_fib.c | 49 #define for_fib_info() { struct dn_fib_info *fi;\ 50 for(fi = dn_fib_info_list; fi; fi = fi->fib_next) 53 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ argument 54 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 56 #define change_nexthops(fi) { int nhsel; struct dn_fib_nh *nh;\ argument 57 for(nhsel = 0, nh = (struct dn_fib_nh *)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++) 59 #define endfor_nexthops(fi) } argument 87 void dn_fib_free_info(struct dn_fib_info *fi) in dn_fib_free_info() argument 89 if (fi->fib_dead == 0) { in dn_fib_free_info() 94 change_nexthops(fi) { in dn_fib_free_info() [all …]
|
D | dn_table.c | 64 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ argument 65 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 67 #define endfor_nexthops(fi) } argument 229 …fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct nlattr *attrs[], struct dn_fib_info *fi) in dn_fib_nh_match() argument 235 nla_get_u32(attrs[RTA_PRIORITY]) != fi->fib_priority) in dn_fib_nh_match() 239 if ((!attrs[RTA_OIF] || nla_get_u32(attrs[RTA_OIF]) == fi->fib_nh->nh_oif) && in dn_fib_nh_match() 240 (!attrs[RTA_GATEWAY] || nla_get_le16(attrs[RTA_GATEWAY]) != fi->fib_nh->nh_gw)) in dn_fib_nh_match() 251 for_nexthops(fi) { in dn_fib_nh_match() 269 } endfor_nexthops(fi); in dn_fib_nh_match() 274 static inline size_t dn_fib_nlmsg_size(struct dn_fib_info *fi) in dn_fib_nlmsg_size() argument [all …]
|
D | dn_route.c | 864 struct dn_fib_info *fi = res->fi; in dn_rt_set_next_hop() local 869 if (fi) { in dn_rt_set_next_hop() 873 dst_init_metrics(&rt->dst, fi->fib_metrics, true); in dn_rt_set_next_hop() 944 return (daddr&~mask)|res->fi->fib_nh->nh_gw; in dn_fib_rules_map_destination() 962 struct dn_fib_res res = { .fi = NULL, .type = RTN_UNICAST }; in dn_route_output_slow() 1148 if (res.fi) in dn_route_output_slow() 1149 dn_fib_info_put(res.fi); in dn_route_output_slow() 1150 res.fi = NULL; in dn_route_output_slow() 1154 if (res.fi->fib_nhs > 1 && fld.flowidn_oif == 0) in dn_route_output_slow() 1319 struct dn_fib_res res = { .fi = NULL, .type = RTN_UNREACHABLE }; in dn_route_input_slow() [all …]
|
/net/ipv4/ |
D | fib_semantics.c | 65 #define for_nexthops(fi) { \ argument 67 for (nhsel = 0, nh = (fi)->fib_nh; \ 68 nhsel < fib_info_num_path((fi)); \ 71 #define change_nexthops(fi) { \ argument 73 for (nhsel = 0, nexthop_nh = (struct fib_nh *)((fi)->fib_nh); \ 74 nhsel < fib_info_num_path((fi)); \ 81 #define for_nexthops(fi) { \ argument 82 int nhsel; const struct fib_nh *nh = (fi)->fib_nh; \ 85 #define change_nexthops(fi) { \ argument 87 struct fib_nh *nexthop_nh = (struct fib_nh *)((fi)->fib_nh); \ [all …]
|
D | fib_lookup.h | 35 int fib_nh_match(struct fib_config *cfg, struct fib_info *fi, 37 bool fib_metrics_match(struct fib_config *cfg, struct fib_info *fi); 39 u8 type, __be32 dst, int dst_len, u8 tos, struct fib_info *fi, 45 struct fib_info *fi) in fib_result_assign() argument 48 res->fi = fi; in fib_result_assign() 49 res->nhc = fib_info_nhc(fi, 0); in fib_result_assign()
|
D | fib_trie.c | 84 .fi = fa->fa_info, in call_fib_entry_notifier() 101 .fi = fa->fa_info, in call_fib_entry_notifiers() 1128 struct fib_info *fi; in fib_table_insert() local 1142 fi = fib_create_info(cfg, extack); in fib_table_insert() 1143 if (IS_ERR(fi)) { in fib_table_insert() 1144 err = PTR_ERR(fi); in fib_table_insert() 1149 fa = l ? fib_find_alias(&l->leaf, slen, tos, fi->fib_priority, in fib_table_insert() 1162 fa->fa_info->fib_priority == fi->fib_priority) { in fib_table_insert() 1183 if (fa->fa_info->fib_priority != fi->fib_priority) in fib_table_insert() 1186 fa->fa_info == fi) { in fib_table_insert() [all …]
|
D | route.c | 1397 struct fib_info *fi = res->fi; in ip_mtu_from_fib_result() local 1401 fi->fib_metrics->metrics[RTAX_LOCK - 1] & (1 << RTAX_MTU)) in ip_mtu_from_fib_result() 1402 mtu = fi->fib_mtu; in ip_mtu_from_fib_result() 1565 struct fib_info *fi, u16 type, u32 itag, in rt_set_nexthop() argument 1570 if (fi) { in rt_set_nexthop() 1583 ip_dst_init_metrics(&rt->dst, fi->fib_metrics); in rt_set_nexthop() 1813 do_cache = res->fi && !itag; in __mkroute_input() 1864 rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag, in __mkroute_input() 2016 if (res->fi && fib_info_num_path(res->fi) > 1) { in ip_mkroute_input() 2017 int h = fib_multipath_hash(res->fi->fib_net, NULL, skb, hkeys); in ip_mkroute_input() [all …]
|
D | nexthop.c | 666 struct fib_info *fi; in fib_check_nh_list() local 668 list_for_each_entry(fi, &old->fi_list, nh_list) { in fib_check_nh_list() 671 err = fib_check_nexthop(new, fi->fib_scope, extack); in fib_check_nh_list() 775 struct fib_info *fi; in __remove_nexthop_fib() local 777 list_for_each_entry(fi, &nh->fi_list, nh_list) { in __remove_nexthop_fib() 778 fi->fib_flags |= RTNH_F_DEAD; in __remove_nexthop_fib() 900 struct fib_info *fi; in __nexthop_replace_notify() local 906 list_for_each_entry(fi, &nh->fi_list, nh_list) in __nexthop_replace_notify() 907 fi->nh_updated = true; in __nexthop_replace_notify() 911 list_for_each_entry(fi, &nh->fi_list, nh_list) in __nexthop_replace_notify() [all …]
|
D | fib_rules.c | 145 if (result->fi) { in fib4_rule_suppress() 146 struct fib_nh_common *nhc = fib_info_nhc(result->fi, 0); in fib4_rule_suppress() 167 fib_info_put(result->fi); in fib4_rule_suppress()
|
D | fib_frontend.c | 235 struct fib_nh_common *nhc = fib_info_nhc(res.fi, 0); in __inet_dev_addr_type() 318 bool fib_info_nh_uses_dev(struct fib_info *fi, const struct net_device *dev) in fib_info_nh_uses_dev() argument 324 for (ret = 0; ret < fib_info_num_path(fi); ret++) { in fib_info_nh_uses_dev() 325 const struct fib_nh_common *nhc = fib_info_nhc(fi, ret); in fib_info_nh_uses_dev() 336 if (fib_info_nhc(fi, 0)->nhc_dev == dev) in fib_info_nh_uses_dev() 391 dev_match = fib_info_nh_uses_dev(res.fi, dev); in __fib_validate_source()
|
/net/ipv4/netfilter/ |
D | ipt_rpfilter.c | 45 return fib_info_nh_uses_dev(res.fi, dev) || flags & XT_RPFILTER_LOOSE; in rpfilter_lookup_reverse()
|
D | nft_fib_ipv4.c | 136 if (!fib_info_nh_uses_dev(res.fi, oif)) in nft_fib4_eval()
|
/net/core/ |
D | filter.c | 4685 if (fib_info_num_path(res.fi) > 1) in bpf_ipv4_fib_lookup() 4702 params->rt_metric = res.fi->fib_priority; in bpf_ipv4_fib_lookup()
|