Lines Matching refs:num_nh
123 u16 num_nh = nhg->num_nh; in nh_notifier_mpath_info_init() local
127 info->nh_grp = kzalloc(struct_size(info->nh_grp, nh_entries, num_nh), in nh_notifier_mpath_info_init()
132 info->nh_grp->num_nh = num_nh; in nh_notifier_mpath_info_init()
135 for (i = 0; i < num_nh; i++) { in nh_notifier_mpath_info_init()
473 for (i = 0; i < nhg->num_nh; ++i) { in nexthop_free_group()
532 static struct nh_group *nexthop_grp_alloc(u16 num_nh) in nexthop_grp_alloc() argument
536 nhg = kzalloc(struct_size(nhg, nh_entries, num_nh), GFP_KERNEL); in nexthop_grp_alloc()
538 nhg->num_nh = num_nh; in nexthop_grp_alloc()
660 size_t len = nhg->num_nh * sizeof(*p); in nla_put_nh_group()
678 for (i = 0; i < nhg->num_nh; ++i) { in nla_put_nh_group()
787 size_t sz = sizeof(struct nexthop_grp) * nhg->num_nh; in nh_nlmsg_size_grp()
1174 for (i = 0; i < nhg->num_nh; i++) { in nexthop_select_path_fdb()
1195 for (i = 0; i < nhg->num_nh; ++i) { in nexthop_select_path_hthr()
1262 for (i = 0; i < nhg->num_nh; i++) { in nexthop_for_each_fib6_nh()
1665 for (i = 0; i < nhg->num_nh; ++i) in nh_res_group_rebalance()
1668 for (i = 0; i < nhg->num_nh; ++i) { in nh_res_group_rebalance()
1702 for (j = 0; j < nhg->num_nh; j++) { in nh_res_table_migrate_buckets()
1744 for (i = 0; i < nhg->num_nh; ++i) in nh_hthr_group_rebalance()
1747 for (i = 0; i < nhg->num_nh; ++i) { in nh_hthr_group_rebalance()
1773 if (nhg->num_nh == 1) { in remove_nh_grp_entry()
1783 newg->num_nh = nhg->num_nh; in remove_nh_grp_entry()
1788 for (i = 0, j = 0; i < nhg->num_nh; ++i) { in remove_nh_grp_entry()
1793 newg->num_nh--; in remove_nh_grp_entry()
1849 int i, num_nh = nhg->num_nh; in remove_nexthop_group() local
1851 for (i = 0; i < num_nh; ++i) { in remove_nexthop_group()
1947 for (i = 0; i < nhg->num_nh; i++) { in nh_rt_cache_flush()
2022 for (i = 0; i < newg->num_nh; i++) in replace_nexthop_grp()
2035 for (i = 0; i < oldg->num_nh; i++) in replace_nexthop_grp()
2050 for (i = 0; i < nhg->num_nh; i++) { in nh_group_v4_update()
2437 u16 num_nh = nla_len(grps_attr) / sizeof(*entry); in nexthop_create_group() local
2443 if (WARN_ON(!num_nh)) in nexthop_create_group()
2452 nhg = nexthop_grp_alloc(num_nh); in nexthop_create_group()
2459 nhg->spare = nexthop_grp_alloc(num_nh); in nexthop_create_group()
2467 for (i = 0; i < nhg->num_nh; ++i) { in nexthop_create_group()