As now each qdisc or tclass is configured when it is ready.
hashmap_free_with_destructor(network->rules_by_section, routing_policy_rule_free);
hashmap_free_with_destructor(network->dhcp_static_leases_by_section, dhcp_static_lease_free);
ordered_hashmap_free_with_destructor(network->sr_iov_by_section, sr_iov_free);
- ordered_hashmap_free_with_destructor(network->tc_by_section, traffic_control_free);
+ hashmap_free_with_destructor(network->tc_by_section, traffic_control_free);
free(network->name);
Hashmap *route_prefixes_by_section;
Hashmap *rules_by_section;
Hashmap *dhcp_static_leases_by_section;
- OrderedHashmap *tc_by_section;
+ Hashmap *tc_by_section;
OrderedHashmap *sr_iov_by_section;
/* All kinds of DNS configuration */
if (r < 0)
return r;
- existing = ordered_hashmap_get(network->tc_by_section, n);
+ existing = hashmap_get(network->tc_by_section, n);
if (existing) {
if (existing->kind != TC_KIND_QDISC)
return -EINVAL;
qdisc->section = TAKE_PTR(n);
qdisc->source = NETWORK_CONFIG_SOURCE_STATIC;
- r = ordered_hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, qdisc->section, TC(qdisc));
+ r = hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, qdisc->section, TC(qdisc));
if (r < 0)
return r;
return NULL;
if (qdisc->network && qdisc->section)
- ordered_hashmap_remove(qdisc->network->tc_by_section, qdisc->section);
+ hashmap_remove(qdisc->network->tc_by_section, qdisc->section);
config_section_free(qdisc->section);
link->tc_configured = false;
- ORDERED_HASHMAP_FOREACH(tc, link->network->tc_by_section) {
+ HASHMAP_FOREACH(tc, link->network->tc_by_section) {
r = link_request_traffic_control_one(link, tc);
if (r < 0)
return r;
assert(network);
- ORDERED_HASHMAP_FOREACH(tc, network->tc_by_section)
+ HASHMAP_FOREACH(tc, network->tc_by_section)
if (traffic_control_section_verify(tc, &has_root, &has_clsact) < 0)
traffic_control_free(tc);
}
if (r < 0)
return r;
- existing = ordered_hashmap_get(network->tc_by_section, n);
+ existing = hashmap_get(network->tc_by_section, n);
if (existing) {
TClass *t;
tclass->section = TAKE_PTR(n);
tclass->source = NETWORK_CONFIG_SOURCE_STATIC;
- r = ordered_hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, tclass->section, tclass);
+ r = hashmap_ensure_put(&network->tc_by_section, &config_section_hash_ops, tclass->section, tclass);
if (r < 0)
return r;
return NULL;
if (tclass->network && tclass->section)
- ordered_hashmap_remove(tclass->network->tc_by_section, tclass->section);
+ hashmap_remove(tclass->network->tc_by_section, tclass->section);
config_section_free(tclass->section);