Home
last modified time | relevance | path

Searched refs:fib_nh (Results 1 – 13 of 13) sorted by relevance

/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/
Dlag_mp.c115 struct fib_nh *fib_nh0, *fib_nh1; in mlx5_lag_fib_route_event()
134 struct fib_nh *nh = fib_info_nh(fi, 0); in mlx5_lag_fib_route_event()
178 struct fib_nh *fib_nh, in mlx5_lag_fib_nexthop_event() argument
189 int i = mlx5_lag_dev_get_netdev_idx(ldev, fib_nh->fib_nh_dev); in mlx5_lag_fib_nexthop_event()
206 struct fib_nh *fib_nh; in mlx5_lag_fib_update() local
219 fib_nh = fib_work->fnh_info.fib_nh; in mlx5_lag_fib_update()
222 fib_work->fnh_info.fib_nh, in mlx5_lag_fib_update()
223 fib_nh->nh_parent); in mlx5_lag_fib_update()
224 fib_info_put(fib_work->fnh_info.fib_nh->nh_parent); in mlx5_lag_fib_update()
297 fib_info_hold(fib_work->fnh_info.fib_nh->nh_parent); in mlx5_lag_fib_event()
/kernel/linux/linux-5.10/include/net/
Dip_fib.h103 struct fib_nh { struct
156 struct fib_nh fib_nh[]; member
231 struct fib_nh *fib_nh; member
472 int fib_check_nh(struct net *net, struct fib_nh *nh, u32 table, u8 scope,
478 int fib_nh_init(struct net *net, struct fib_nh *fib_nh,
481 void fib_nh_release(struct net *net, struct fib_nh *fib_nh);
503 struct fib_nh *nh; in fib_combine_itag()
505 nh = container_of(nhc, struct fib_nh, nh_common); in fib_combine_itag()
Dnexthop.h61 struct fib_nh fib_nh; member
256 BUILD_BUG_ON(offsetof(struct fib_nh, nh_common) != 0); in nexthop_fib_nhc()
348 return &fi->fib_nh[nhsel].nh_common; in fib_info_nhc()
352 static inline struct fib_nh *fib_info_nh(struct fib_info *fi, int nhsel) in fib_info_nh()
356 return &fi->fib_nh[nhsel]; in fib_info_nh()
Ddn_fib.h42 struct dn_fib_nh fib_nh[0]; member
43 #define dn_fib_dev fib_nh[0].nh_dev
48 #define DN_FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel])
Droute.h46 struct fib_nh;
/kernel/linux/linux-5.10/net/ipv4/
Dfib_semantics.c67 int nhsel; const struct fib_nh *nh; \
68 for (nhsel = 0, nh = (fi)->fib_nh; \
73 int nhsel; struct fib_nh *nexthop_nh; \
74 for (nhsel = 0, nexthop_nh = (struct fib_nh *)((fi)->fib_nh); \
83 int nhsel; const struct fib_nh *nh = (fi)->fib_nh; \
88 struct fib_nh *nexthop_nh = (struct fib_nh *)((fi)->fib_nh); \
222 void fib_nh_release(struct net *net, struct fib_nh *fib_nh) in fib_nh_release() argument
225 if (fib_nh->nh_tclassid) in fib_nh_release()
228 fib_nh_common_release(&fib_nh->nh_common); in fib_nh_release()
288 const struct fib_nh *onh; in nh_comp()
[all …]
Dnexthop.c98 fib_nh_release(nh->net, &nhi->fib_nh); in nexthop_free_single()
228 struct fib_nh *fib_nh; in nh_fill_node() local
277 fib_nh = &nhi->fib_nh; in nh_fill_node()
278 if (fib_nh->fib_nh_gw_family && in nh_fill_node()
279 nla_put_be32(skb, NHA_GATEWAY, fib_nh->fib_nh_gw4)) in nh_fill_node()
326 if (nhi->fib_nh.fib_nh_gw_family) in nh_nlmsg_size_single()
525 static bool ipv4_good_nh(const struct fib_nh *nh) in ipv4_good_nh()
568 if (ipv4_good_nh(&nhi->fib_nh)) in nexthop_select_path()
1322 struct fib_nh *fib_nh = &nhi->fib_nh; in nh_create_ipv4() local
1335 err = fib_nh_init(net, fib_nh, &fib_cfg, 1, extack); in nh_create_ipv4()
[all …]
Droute.c1632 struct fib_nh *nh; in rt_set_nexthop()
1634 nh = container_of(nhc, struct fib_nh, nh_common); in rt_set_nexthop()
/kernel/linux/linux-5.10/net/decnet/
Ddn_fib.c54 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
57 for(nhsel = 0, nh = (struct dn_fib_nh *)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++)
120 const struct dn_fib_nh *onh = ofi->fib_nh; in dn_fib_nh_comp()
285 fi = kzalloc(struct_size(fi, fib_nh, nhs), GFP_KERNEL); in dn_fib_create_info()
322 fi->fib_nh->nh_oif != nla_get_u32(attrs[RTA_OIF])) in dn_fib_create_info()
326 fi->fib_nh->nh_gw != nla_get_le16(attrs[RTA_GATEWAY])) in dn_fib_create_info()
329 struct dn_fib_nh *nh = fi->fib_nh; in dn_fib_create_info()
345 fi->fib_nh->nh_gw = nla_get_le16(attrs[RTA_GATEWAY]); in dn_fib_create_info()
360 struct dn_fib_nh *nh = fi->fib_nh; in dn_fib_create_info()
366 nh->nh_dev = dev_get_by_index(&init_net, fi->fib_nh->nh_oif); in dn_fib_create_info()
Ddn_table.c65 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
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()
338 if (fi->fib_nh->nh_gw && in dn_fib_dump_info()
339 nla_put_le16(skb, RTA_GATEWAY, fi->fib_nh->nh_gw) < 0) in dn_fib_dump_info()
342 if (fi->fib_nh->nh_oif && in dn_fib_dump_info()
343 nla_put_u32(skb, RTA_OIF, fi->fib_nh->nh_oif) < 0) in dn_fib_dump_info()
Ddn_route.c946 return (daddr&~mask)|res->fi->fib_nh->nh_gw; in dn_fib_rules_map_destination()
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_router.c2748 struct fib_nh *fib_nh; member
3405 nh->key.fib_nh->fib_nh_flags |= RTNH_F_OFFLOAD; in mlxsw_sp_nexthop4_group_offload_refresh()
3407 nh->key.fib_nh->fib_nh_flags &= ~RTNH_F_OFFLOAD; in mlxsw_sp_nexthop4_group_offload_refresh()
3803 const struct fib_nh *fib_nh, in mlxsw_sp_nexthop4_ipip_type() argument
3806 struct net_device *dev = fib_nh->fib_nh_dev; in mlxsw_sp_nexthop4_ipip_type()
3809 fib_nh->nh_parent->fib_type == RTN_UNICAST && in mlxsw_sp_nexthop4_ipip_type()
3830 struct fib_nh *fib_nh) in mlxsw_sp_nexthop4_type_init() argument
3833 struct net_device *dev = fib_nh->fib_nh_dev; in mlxsw_sp_nexthop4_type_init()
3875 struct fib_nh *fib_nh) in mlxsw_sp_nexthop4_init() argument
3877 struct net_device *dev = fib_nh->fib_nh_dev; in mlxsw_sp_nexthop4_init()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/rocker/
Drocker_ofdpa.c2271 const struct fib_nh *nh; in ofdpa_port_fib_ipv4()
2737 struct fib_nh *nh; in ofdpa_fib4_add()
2760 struct fib_nh *nh; in ofdpa_fib4_del()
2788 struct fib_nh *nh; in ofdpa_fib4_abort()