Home
last modified time | relevance | path

Searched refs:nhg (Results 1 – 2 of 2) sorted by relevance

/Linux-v5.4/net/ipv4/
Dnexthop.c63 struct nh_group *nhg; in nexthop_free_mpath() local
66 nhg = rcu_dereference_raw(nh->nh_grp); in nexthop_free_mpath()
67 for (i = 0; i < nhg->num_nh; ++i) in nexthop_free_mpath()
68 WARN_ON(nhg->nh_entries[i].nh); in nexthop_free_mpath()
70 kfree(nhg); in nexthop_free_mpath()
120 struct nh_group *nhg; in nexthop_grp_alloc() local
122 nhg = kzalloc(sz, GFP_KERNEL); in nexthop_grp_alloc()
123 if (nhg) in nexthop_grp_alloc()
124 nhg->num_nh = num_nh; in nexthop_grp_alloc()
126 return nhg; in nexthop_grp_alloc()
[all …]
/Linux-v5.4/include/net/
Dnexthop.h152 const struct nh_group *nhg = rcu_dereference_rtnl(nh->nh_grp); in nexthop_mpath_select() local
157 if (nhsel >= nhg->num_nh) in nexthop_mpath_select()
160 return nhg->nh_entries[nhsel].nh; in nexthop_mpath_select()
167 struct nh_group *nhg = rtnl_dereference(nh->nh_grp); in nexthop_mpath_fill_node() local
170 for (i = 0; i < nhg->num_nh; i++) { in nexthop_mpath_fill_node()
171 struct nexthop *nhe = nhg->nh_entries[i].nh; in nexthop_mpath_fill_node()
174 int weight = nhg->nh_entries[i].weight; in nexthop_mpath_fill_node()