network: tc - use TAKE_PTR (#18266)

* network: tc cake - use TAKE_PTR

* network: tc htb - use TAKE_PTR

* network: tc pie - use TAKE_PTR

* network: tc netem - use TAKE_PTR

* network: tc hhf - use TAKE_PTR

* network: tc gred - use TAKE_PTR

* network: tc fq codel - use TAKE_PTR

* network: tc fifo - use TAKE_PTR

* network: tc drr - use TAKE_PTR

* network: tc qdisc - use TAKE_PTR
This commit is contained in:
Susant Sahani
2021-01-16 22:08:36 +01:00
committed by GitHub
parent 2b5a1402f6
commit 0132453c40
10 changed files with 39 additions and 39 deletions

View File

@@ -79,7 +79,7 @@ int config_parse_cake_bandwidth(
if (isempty(rvalue)) {
c->bandwidth = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -92,7 +92,7 @@ int config_parse_cake_bandwidth(
}
c->bandwidth = k/8;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -133,7 +133,7 @@ int config_parse_cake_overhead(
if (isempty(rvalue)) {
c->overhead = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -152,7 +152,7 @@ int config_parse_cake_overhead(
}
c->overhead = v;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -79,7 +79,7 @@ int config_parse_drr_size(
if (isempty(rvalue)) {
drr->quantum = 0;
tclass = NULL;
TAKE_PTR(tclass);
return 0;
}
@@ -98,7 +98,7 @@ int config_parse_drr_size(
drr->quantum = (uint32_t) u;
tclass = NULL;
TAKE_PTR(tclass);
return 0;
}

View File

@@ -87,7 +87,7 @@ int config_parse_pfifo_size(
if (isempty(rvalue)) {
fifo->limit = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -99,7 +99,7 @@ int config_parse_pfifo_size(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -140,7 +140,7 @@ int config_parse_bfifo_size(
if (isempty(rvalue)) {
fifo->limit = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -159,7 +159,7 @@ int config_parse_bfifo_size(
fifo->limit = (uint32_t) u;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -138,7 +138,7 @@ int config_parse_fair_queueing_controlled_delay_u32(
if (isempty(rvalue)) {
*p = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -150,7 +150,7 @@ int config_parse_fair_queueing_controlled_delay_u32(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -204,7 +204,7 @@ int config_parse_fair_queueing_controlled_delay_usec(
else
*p = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -216,7 +216,7 @@ int config_parse_fair_queueing_controlled_delay_usec(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -257,7 +257,7 @@ int config_parse_fair_queueing_controlled_delay_bool(
if (isempty(rvalue)) {
fqcd->ecn = -1;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -270,7 +270,7 @@ int config_parse_fair_queueing_controlled_delay_bool(
}
fqcd->ecn = r;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -323,7 +323,7 @@ int config_parse_fair_queueing_controlled_delay_size(
else
*p = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -342,7 +342,7 @@ int config_parse_fair_queueing_controlled_delay_size(
}
*p = sz;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -111,7 +111,7 @@ int config_parse_generic_random_early_detection_u32(
if (isempty(rvalue)) {
*p = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -129,7 +129,7 @@ int config_parse_generic_random_early_detection_u32(
lvalue, rvalue);
*p = v;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -169,7 +169,7 @@ int config_parse_generic_random_early_detection_bool(
if (isempty(rvalue)) {
gred->grio = -1;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -182,7 +182,7 @@ int config_parse_generic_random_early_detection_bool(
}
gred->grio = r;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -74,7 +74,7 @@ int config_parse_heavy_hitter_filter_packet_limit(
if (isempty(rvalue)) {
hhf->packet_limit = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -86,7 +86,7 @@ int config_parse_heavy_hitter_filter_packet_limit(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -80,7 +80,7 @@ int config_parse_hierarchy_token_bucket_default_class(
if (isempty(rvalue)) {
htb->default_class = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -92,7 +92,7 @@ int config_parse_hierarchy_token_bucket_default_class(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -133,7 +133,7 @@ int config_parse_hierarchy_token_bucket_u32(
if (isempty(rvalue)) {
htb->rate_to_quantum = HTB_DEFAULT_RATE_TO_QUANTUM;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -145,7 +145,7 @@ int config_parse_hierarchy_token_bucket_u32(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -94,7 +94,7 @@ int config_parse_network_emulator_delay(
else if (STR_IN_SET(lvalue, "DelayJitterSec", "NetworkEmulatorDelayJitterSec"))
ne->jitter = USEC_INFINITY;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -111,7 +111,7 @@ int config_parse_network_emulator_delay(
else if (STR_IN_SET(lvalue, "DelayJitterSec", "NetworkEmulatorDelayJitterSec"))
ne->jitter = u;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -156,7 +156,7 @@ int config_parse_network_emulator_rate(
else if (STR_IN_SET(lvalue, "DuplicateRate", "NetworkEmulatorDuplicateRate"))
ne->duplicate = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -173,7 +173,7 @@ int config_parse_network_emulator_rate(
else if (STR_IN_SET(lvalue, "DuplicateRate", "NetworkEmulatorDuplicateRate"))
ne->duplicate = rate;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -212,8 +212,8 @@ int config_parse_network_emulator_packet_limit(
if (isempty(rvalue)) {
ne->limit = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -225,7 +225,7 @@ int config_parse_network_emulator_packet_limit(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -73,7 +73,7 @@ int config_parse_pie_packet_limit(
if (isempty(rvalue)) {
pie->packet_limit = 0;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -85,7 +85,7 @@ int config_parse_pie_packet_limit(
return 0;
}
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}

View File

@@ -324,7 +324,7 @@ int config_parse_qdisc_parent(
} else
qdisc->tca_kind = mfree(qdisc->tca_kind);
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -362,7 +362,7 @@ int config_parse_qdisc_handle(
if (isempty(rvalue)) {
qdisc->handle = TC_H_UNSPEC;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}
@@ -375,7 +375,7 @@ int config_parse_qdisc_handle(
}
qdisc->handle = (uint32_t) n << 16;
qdisc = NULL;
TAKE_PTR(qdisc);
return 0;
}