Lines Matching refs:nhg
171 struct nexthop_grp *nhg; in nexthop_dup() local
188 HASHMAP_FOREACH(nhg, src->group) { in nexthop_dup()
191 g = newdup(struct nexthop_grp, nhg, 1); in nexthop_dup()
350 struct nexthop_grp *nhg; in log_nexthop_debug() local
364 HASHMAP_FOREACH(nhg, nexthop->group) in log_nexthop_debug() local
365 … (void) strextendf_with_separator(&group, ",", "%"PRIu32":%"PRIu32, nhg->id, nhg->weight+1); in log_nexthop_debug()
454 struct nexthop_grp *p, *nhg; in nexthop_configure() local
461 HASHMAP_FOREACH(nhg, nexthop->group) in nexthop_configure()
462 *p++ = *nhg; in nexthop_configure()
514 struct nexthop_grp *nhg; in nexthop_is_ready_to_configure() local
533 HASHMAP_FOREACH(nhg, nexthop->group) { in nexthop_is_ready_to_configure()
536 if (manager_get_nexthop_by_id(link->manager, nhg->id, &g) < 0) in nexthop_is_ready_to_configure()
900 _cleanup_free_ struct nexthop_grp *nhg = NULL; in manager_rtnl_process_nexthop() local
911 nhg = newdup(struct nexthop_grp, group + i, 1); in manager_rtnl_process_nexthop()
912 if (!nhg) in manager_rtnl_process_nexthop()
915 r = hashmap_ensure_put(&tmp->group, NULL, UINT32_TO_PTR(nhg->id), nhg); in manager_rtnl_process_nexthop()
923 TAKE_PTR(nhg); in manager_rtnl_process_nexthop()
1336 _cleanup_free_ struct nexthop_grp *nhg = NULL; in config_parse_nexthop_group() local
1352 nhg = new0(struct nexthop_grp, 1); in config_parse_nexthop_group()
1353 if (!nhg) in config_parse_nexthop_group()
1373 nhg->weight = w - 1; in config_parse_nexthop_group()
1376 r = safe_atou32(word, &nhg->id); in config_parse_nexthop_group()
1383 if (nhg->id == 0) { in config_parse_nexthop_group()
1390 r = hashmap_ensure_put(&n->group, NULL, UINT32_TO_PTR(nhg->id), nhg); in config_parse_nexthop_group()
1396 nhg->id, lvalue, word, sep ? ":" : "", strempty(sep)); in config_parse_nexthop_group()
1400 TAKE_PTR(nhg); in config_parse_nexthop_group()