Searched refs:nhg (Results 1 – 2 of 2) sorted by relevance
74 struct nh_group *nhg; in nexthop_free_mpath() local77 nhg = rcu_dereference_raw(nh->nh_grp); in nexthop_free_mpath()78 for (i = 0; i < nhg->num_nh; ++i) { in nexthop_free_mpath()79 struct nh_grp_entry *nhge = &nhg->nh_entries[i]; in nexthop_free_mpath()85 WARN_ON(nhg->spare == nhg); in nexthop_free_mpath()87 kfree(nhg->spare); in nexthop_free_mpath()88 kfree(nhg); in nexthop_free_mpath()136 struct nh_group *nhg; in nexthop_grp_alloc() local138 nhg = kzalloc(struct_size(nhg, nh_entries, num_nh), GFP_KERNEL); in nexthop_grp_alloc()139 if (nhg) in nexthop_grp_alloc()[all …]
190 struct nexthop *nexthop_mpath_select(const struct nh_group *nhg, int nhsel) in nexthop_mpath_select() argument195 if (nhsel >= nhg->num_nh) in nexthop_mpath_select()198 return nhg->nh_entries[nhsel].nh; in nexthop_mpath_select()205 struct nh_group *nhg = rtnl_dereference(nh->nh_grp); in nexthop_mpath_fill_node() local208 for (i = 0; i < nhg->num_nh; i++) { in nexthop_mpath_fill_node()209 struct nexthop *nhe = nhg->nh_entries[i].nh; in nexthop_mpath_fill_node()212 int weight = nhg->nh_entries[i].weight; in nexthop_mpath_fill_node()284 struct nh_group *nhg = rcu_dereference(nh->nh_grp); in nexthop_get_nhc_lookup() local287 for (i = 0; i < nhg->num_nh; i++) { in nexthop_get_nhc_lookup()288 struct nexthop *nhe = nhg->nh_entries[i].nh; in nexthop_get_nhc_lookup()[all …]