mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
network: split TrafficControlQueueingDiscipline section into small pieces
Closes #14763.
This commit is contained in:
@@ -2263,10 +2263,11 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>[TrafficControlQueueingDiscipline] Section Options</title>
|
||||
<para>The <literal>[TrafficControlQueueingDiscipline]</literal> section manages the Traffic control. It can be used
|
||||
to configure the kernel packet scheduler and simulate packet delay and loss for UDP or TCP applications,
|
||||
or limit the bandwidth usage of a particular service to simulate internet connections.</para>
|
||||
<title>[NetworkEmulator] Section Options</title>
|
||||
<para>The <literal>[NetworkEmulator]</literal> section manages the queueing discipline (qdisc) of
|
||||
the network emulator. It can be used to configure the kernel packet scheduler and simulate packet
|
||||
delay and loss for UDP or TCP applications, or limit the bandwidth usage of a particular service to
|
||||
simulate internet connections.</para>
|
||||
|
||||
<variablelist class='network-directives'>
|
||||
<varlistentry>
|
||||
@@ -2278,7 +2279,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>NetworkEmulatorDelaySec=</varname></term>
|
||||
<term><varname>DelaySec=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the fixed amount of delay to be added to all packets going out of the
|
||||
interface. Defaults to unset.</para>
|
||||
@@ -2286,7 +2287,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>NetworkEmulatorDelayJitterSec=</varname></term>
|
||||
<term><varname>DelayJitterSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the chosen delay to be added to the packets outgoing to the network
|
||||
interface. Defaults to unset.</para>
|
||||
@@ -2294,7 +2295,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>NetworkEmulatorPacketLimit=</varname></term>
|
||||
<term><varname>PacketLimit=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the maximum number of packets the qdisc may hold queued at a time.
|
||||
An unsigned integer ranges 0 to 4294967294. Defaults to 1000.</para>
|
||||
@@ -2302,7 +2303,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>NetworkEmulatorLossRate=</varname></term>
|
||||
<term><varname>LossRate=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies an independent loss probability to be added to the packets outgoing from the
|
||||
network interface. Takes a percentage value, suffixed with "%". Defaults to unset.</para>
|
||||
@@ -2310,15 +2311,31 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>NetworkEmulatorDuplicateRate=</varname></term>
|
||||
<term><varname>DuplicateRate=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies that the chosen percent of packets is duplicated before queuing them.
|
||||
Takes a percentage value, suffixed with "%". Defaults to unset.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>[TokenBufferFilter] Section Options</title>
|
||||
<para>The <literal>[TokenBufferFilter]</literal> section manages the queueing discipline (qdisc) of
|
||||
token buffer filter (tbf).</para>
|
||||
|
||||
<variablelist class='network-directives'>
|
||||
<varlistentry>
|
||||
<term><varname>Parent=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>,
|
||||
<literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterLatencySec=</varname></term>
|
||||
<term><varname>LatencySec=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the latency parameter, which specifies the maximum amount of time a
|
||||
packet can sit in the Token Buffer Filter (TBF). Defaults to unset.</para>
|
||||
@@ -2326,7 +2343,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterLimitSize=</varname></term>
|
||||
<term><varname>LimitSize=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes the number of bytes that can be queued waiting for tokens to become available.
|
||||
When the size is suffixed with K, M, or G, it is parsed as Kilobytes, Megabytes, or Gigabytes,
|
||||
@@ -2335,7 +2352,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterBurst=</varname></term>
|
||||
<term><varname>Burst=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the size of the bucket. This is the maximum amount of bytes that tokens
|
||||
can be available for instantaneous transfer. When the size is suffixed with K, M, or G, it is
|
||||
@@ -2345,7 +2362,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterRate=</varname></term>
|
||||
<term><varname>Rate=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the device specific bandwidth. When suffixed with K, M, or G, the specified
|
||||
bandwidth is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of 1000.
|
||||
@@ -2354,7 +2371,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterMPUBytes=</varname></term>
|
||||
<term><varname>MPUBytes=</varname></term>
|
||||
<listitem>
|
||||
<para>The Minimum Packet Unit (MPU) determines the minimal token usage (specified in bytes)
|
||||
for a packet. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
|
||||
@@ -2363,7 +2380,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterPeakRate=</varname></term>
|
||||
<term><varname>PeakRate=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes the maximum depletion rate of the bucket. When suffixed with K, M, or G, the
|
||||
specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
|
||||
@@ -2372,23 +2389,55 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>TokenBufferFilterMTUBytes=</varname></term>
|
||||
<term><varname>MTUBytes=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the size of the peakrate bucket. When suffixed with K, M, or G, the specified
|
||||
size is parsed as Kilobytes, Megabytes, or Gigabytes, respectively, to the base of 1000.
|
||||
Defaults to unset.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>[StochasticFairnessQueueing] Section Options</title>
|
||||
<para>The <literal>[StochasticFairnessQueueing]</literal> section manages the queueing discipline
|
||||
(qdisc) of stochastic fairness queueing (sfq).</para>
|
||||
|
||||
<variablelist class='network-directives'>
|
||||
<varlistentry>
|
||||
<term><varname>StochasticFairnessQueueingPerturbPeriodSec=</varname></term>
|
||||
<term><varname>Parent=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the interval in seconds for queue algorithm perturbation. Defaults to unset.</para>
|
||||
<para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>,
|
||||
<literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>ControlledDelayPacketLimit=</varname></term>
|
||||
<term><varname>PerturbPeriodSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the interval in seconds for queue algorithm perturbation. Defaults to unset.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>[ControlledDelay] Section Options</title>
|
||||
<para>The <literal>[ControlledDelay]</literal> section manages the queueing discipline (qdisc) of
|
||||
controlled delay (CoDel).</para>
|
||||
|
||||
<variablelist class='network-directives'>
|
||||
<varlistentry>
|
||||
<term><varname>Parent=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>,
|
||||
<literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>PacketLimit=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the hard lmit on the queue size in number of packets. When this limit is reached, incoming packets are
|
||||
dropped. An unsigned integer ranges 0 to 4294967294. Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2396,7 +2445,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>ControlledDelayTargetSec=</varname></term>
|
||||
<term><varname>TargetSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
|
||||
Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2404,7 +2453,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>ControlledDelayIntervalSec=</varname></term>
|
||||
<term><varname>IntervalSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. This is used to ensure that the measured minimum delay does not
|
||||
become too stale. Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2412,7 +2461,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>ControlledDelayECN=</varname></term>
|
||||
<term><varname>ECN=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
|
||||
unset and kernel's default is used.</para>
|
||||
@@ -2420,15 +2469,31 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>ControlledDelayCEThresholdSec=</varname></term>
|
||||
<term><varname>CEThresholdSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
|
||||
Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>[FairQueueingControlledDelay] Section Options</title>
|
||||
<para>The <literal>[FairQueueingControlledDelay]</literal> section manages the queueing discipline
|
||||
(qdisc) of fair queuing controlled delay (FQ-CoDel).</para>
|
||||
|
||||
<variablelist class='network-directives'>
|
||||
<varlistentry>
|
||||
<term><varname>Parent=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>,
|
||||
<literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayPacketLimit=</varname></term>
|
||||
<term><varname>PacketLimit=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
|
||||
dropped. Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2436,7 +2501,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayMemoryLimit=</varname></term>
|
||||
<term><varname>MemoryLimit=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the limit on the total number of bytes that can be queued in this FQ-CoDel instance.
|
||||
When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
|
||||
@@ -2445,7 +2510,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayFlows=</varname></term>
|
||||
<term><varname>Flows=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the number of flows into which the incoming packets are classified.
|
||||
Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2453,7 +2518,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayTargetSec=</varname></term>
|
||||
<term><varname>TargetSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. Specifies the acceptable minimum standing/persistent queue delay.
|
||||
Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2461,7 +2526,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayIntervalSec=</varname></term>
|
||||
<term><varname>IntervalSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. This is used to ensure that the measured minimum delay does not
|
||||
become too stale. Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2469,7 +2534,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayQuantum=</varname></term>
|
||||
<term><varname>Quantum=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the number of bytes used as 'deficit' in the fair queuing algorithmtimespan.
|
||||
When suffixed with K, M, or G, the specified size is parsed as Kilobytes, Megabytes, or Gigabytes,
|
||||
@@ -2478,7 +2543,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayECN=</varname></term>
|
||||
<term><varname>ECN=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a boolean. This can be used to mark packets instead of dropping them. Defaults to
|
||||
unset and kernel's default is used.</para>
|
||||
@@ -2486,15 +2551,31 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueuingControlledDelayCEThresholdSec=</varname></term>
|
||||
<term><varname>CEThresholdSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
|
||||
Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>[FairQueueTrafficPolicing] Section Options</title>
|
||||
<para>The <literal>[FairQueueTrafficPolicing]</literal> section manages the queueing discipline
|
||||
(qdisc) of fair queue traffic policing (FQ).</para>
|
||||
|
||||
<variablelist class='network-directives'>
|
||||
<varlistentry>
|
||||
<term><varname>Parent=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the parent Queueing Discipline (qdisc). Takes one of <literal>root</literal>,
|
||||
<literal>clsact</literal> or <literal>ingress</literal>. Defaults to <literal>root</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingPacketLimit=</varname></term>
|
||||
<term><varname>PacketLimit=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the hard limit on the real queue size. When this limit is reached, incoming packets are
|
||||
dropped. Defaults to unset and kernel's default is used.</para>
|
||||
@@ -2502,7 +2583,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingFlowLimit=</varname></term>
|
||||
<term><varname>FlowLimit=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the hard limit on the maximum number of packets queued per flow. Defaults to
|
||||
unset and kernel's default is used.</para>
|
||||
@@ -2510,7 +2591,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingQuantum=</varname></term>
|
||||
<term><varname>Quantum=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the credit per dequeue RR round, i.e. the amount of bytes a flow is allowed
|
||||
to dequeue at once. When suffixed with K, M, or G, the specified size is parsed as Kilobytes,
|
||||
@@ -2520,7 +2601,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingInitialQuantum=</varname></term>
|
||||
<term><varname>InitialQuantum=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the initial sending rate credit, i.e. the amount of bytes a new flow is
|
||||
allowed to dequeue initially. When suffixed with K, M, or G, the specified size is parsed as
|
||||
@@ -2530,7 +2611,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingMaximumRate=</varname></term>
|
||||
<term><varname>MaximumRate=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the maximum sending rate of a flow. When suffixed with K, M, or G, the
|
||||
specified size is parsed as Kilobits, Megabits, or Gigabits, respectively, to the base of
|
||||
@@ -2539,7 +2620,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingBuckets=</varname></term>
|
||||
<term><varname>Buckets=</varname></term>
|
||||
<listitem>
|
||||
<para>Specifies the size of the hash table used for flow lookups. Defaults to unset and
|
||||
kernel's default is used.</para>
|
||||
@@ -2547,7 +2628,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingOrphanMask=</varname></term>
|
||||
<term><varname>OrphanMask=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes an unsigned integer. For packets not owned by a socket, fq is able to mask a part
|
||||
of hash and reduce number of buckets associated with the traffic. Defaults to unset and
|
||||
@@ -2556,7 +2637,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingPacing=</varname></term>
|
||||
<term><varname>Pacing=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a boolean, and enables or disables flow pacing. Defaults to unset and kernel's
|
||||
default is used.</para>
|
||||
@@ -2564,13 +2645,12 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FairQueueTrafficPolicingCEThresholdSec=</varname></term>
|
||||
<term><varname>CEThresholdSec=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a timespan. This sets a threshold above which all packets are marked with ECN
|
||||
Congestion Experienced (CE). Defaults to unset and kernel's default is used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -481,7 +481,13 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
||||
"IPv6Prefix\0"
|
||||
"IPv6RoutePrefix\0"
|
||||
"TrafficControlQueueingDiscipline\0"
|
||||
"CAN\0",
|
||||
"CAN\0"
|
||||
"ControlledDelay\0"
|
||||
"FairQueueTrafficPolicing\0"
|
||||
"FairQueueingControlledDelay\0"
|
||||
"NetworkEmulator\0"
|
||||
"StochasticFairnessQueueing\0"
|
||||
"TokenBufferFilter\0",
|
||||
config_item_perf_lookup, network_network_gperf_lookup,
|
||||
CONFIG_PARSE_WARN, network);
|
||||
if (r < 0)
|
||||
|
||||
@@ -74,7 +74,7 @@ static int controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_me
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_controlled_delay_u32(
|
||||
int config_parse_controlled_delay_u32(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -125,7 +125,7 @@ int config_parse_tc_controlled_delay_u32(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_controlled_delay_usec(
|
||||
int config_parse_controlled_delay_usec(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -157,17 +157,17 @@ int config_parse_tc_controlled_delay_usec(
|
||||
|
||||
cd = CODEL(qdisc);
|
||||
|
||||
if (streq(lvalue, "ControlledDelayTargetSec"))
|
||||
if (streq(lvalue, "TargetSec"))
|
||||
p = &cd->target_usec;
|
||||
else if (streq(lvalue, "ControlledDelayIntervalSec"))
|
||||
else if (streq(lvalue, "IntervalSec"))
|
||||
p = &cd->interval_usec;
|
||||
else if (streq(lvalue, "ControlledDelayCEThresholdSec"))
|
||||
else if (streq(lvalue, "CEThresholdSec"))
|
||||
p = &cd->ce_threshold_usec;
|
||||
else
|
||||
assert_not_reached("Invalid lvalue");
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
if (streq(lvalue, "ControlledDelayCEThresholdSec"))
|
||||
if (streq(lvalue, "CEThresholdSec"))
|
||||
*p = USEC_INFINITY;
|
||||
else
|
||||
*p = 0;
|
||||
@@ -189,7 +189,7 @@ int config_parse_tc_controlled_delay_usec(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_controlled_delay_bool(
|
||||
int config_parse_controlled_delay_bool(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
|
||||
@@ -19,6 +19,6 @@ typedef struct ControlledDelay {
|
||||
DEFINE_QDISC_CAST(CODEL, ControlledDelay);
|
||||
extern const QDiscVTable codel_vtable;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_u32);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_usec);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_controlled_delay_bool);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_controlled_delay_u32);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_controlled_delay_usec);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_controlled_delay_bool);
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "qdisc.h"
|
||||
#include "string-util.h"
|
||||
|
||||
static int fair_queuing_controlled_delay_init(QDisc *qdisc) {
|
||||
FairQueuingControlledDelay *fqcd;
|
||||
static int fair_queueing_controlled_delay_init(QDisc *qdisc) {
|
||||
FairQueueingControlledDelay *fqcd;
|
||||
|
||||
assert(qdisc);
|
||||
|
||||
@@ -24,8 +24,8 @@ static int fair_queuing_controlled_delay_init(QDisc *qdisc) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fair_queuing_controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
|
||||
FairQueuingControlledDelay *fqcd;
|
||||
static int fair_queueing_controlled_delay_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
|
||||
FairQueueingControlledDelay *fqcd;
|
||||
int r;
|
||||
|
||||
assert(link);
|
||||
@@ -93,7 +93,7 @@ static int fair_queuing_controlled_delay_fill_message(Link *link, QDisc *qdisc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queuing_controlled_delay_u32(
|
||||
int config_parse_fair_queueing_controlled_delay_u32(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -106,7 +106,7 @@ int config_parse_tc_fair_queuing_controlled_delay_u32(
|
||||
void *userdata) {
|
||||
|
||||
_cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL;
|
||||
FairQueuingControlledDelay *fqcd;
|
||||
FairQueueingControlledDelay *fqcd;
|
||||
Network *network = data;
|
||||
uint32_t *p;
|
||||
int r;
|
||||
@@ -125,9 +125,9 @@ int config_parse_tc_fair_queuing_controlled_delay_u32(
|
||||
|
||||
fqcd = FQ_CODEL(qdisc);
|
||||
|
||||
if (streq(lvalue, "FairQueuingControlledDelayPacketLimit"))
|
||||
if (streq(lvalue, "PacketLimit"))
|
||||
p = &fqcd->packet_limit;
|
||||
else if (streq(lvalue, "FairQueuingControlledDelayFlows"))
|
||||
else if (streq(lvalue, "Flows"))
|
||||
p = &fqcd->flows;
|
||||
else
|
||||
assert_not_reached("Invalid lvalue.");
|
||||
@@ -152,7 +152,7 @@ int config_parse_tc_fair_queuing_controlled_delay_u32(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queuing_controlled_delay_usec(
|
||||
int config_parse_fair_queueing_controlled_delay_usec(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -165,7 +165,7 @@ int config_parse_tc_fair_queuing_controlled_delay_usec(
|
||||
void *userdata) {
|
||||
|
||||
_cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL;
|
||||
FairQueuingControlledDelay *fqcd;
|
||||
FairQueueingControlledDelay *fqcd;
|
||||
Network *network = data;
|
||||
usec_t *p;
|
||||
int r;
|
||||
@@ -184,17 +184,17 @@ int config_parse_tc_fair_queuing_controlled_delay_usec(
|
||||
|
||||
fqcd = FQ_CODEL(qdisc);
|
||||
|
||||
if (streq(lvalue, "FairQueuingControlledDelayTargetSec"))
|
||||
if (streq(lvalue, "TargetSec"))
|
||||
p = &fqcd->target_usec;
|
||||
else if (streq(lvalue, "FairQueuingControlledDelayIntervalSec"))
|
||||
else if (streq(lvalue, "IntervalSec"))
|
||||
p = &fqcd->interval_usec;
|
||||
else if (streq(lvalue, "FairQueuingControlledDelayCEThresholdSec"))
|
||||
else if (streq(lvalue, "CEThresholdSec"))
|
||||
p = &fqcd->ce_threshold_usec;
|
||||
else
|
||||
assert_not_reached("Invalid lvalue.");
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
if (streq(lvalue, "FairQueuingControlledDelayCEThresholdSec"))
|
||||
if (streq(lvalue, "CEThresholdSec"))
|
||||
*p = USEC_INFINITY;
|
||||
else
|
||||
*p = 0;
|
||||
@@ -216,7 +216,7 @@ int config_parse_tc_fair_queuing_controlled_delay_usec(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queuing_controlled_delay_bool(
|
||||
int config_parse_fair_queueing_controlled_delay_bool(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -229,7 +229,7 @@ int config_parse_tc_fair_queuing_controlled_delay_bool(
|
||||
void *userdata) {
|
||||
|
||||
_cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL;
|
||||
FairQueuingControlledDelay *fqcd;
|
||||
FairQueueingControlledDelay *fqcd;
|
||||
Network *network = data;
|
||||
int r;
|
||||
|
||||
@@ -268,7 +268,7 @@ int config_parse_tc_fair_queuing_controlled_delay_bool(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queuing_controlled_delay_size(
|
||||
int config_parse_fair_queueing_controlled_delay_size(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -281,7 +281,7 @@ int config_parse_tc_fair_queuing_controlled_delay_size(
|
||||
void *userdata) {
|
||||
|
||||
_cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL;
|
||||
FairQueuingControlledDelay *fqcd;
|
||||
FairQueueingControlledDelay *fqcd;
|
||||
Network *network = data;
|
||||
uint64_t sz;
|
||||
uint32_t *p;
|
||||
@@ -301,15 +301,15 @@ int config_parse_tc_fair_queuing_controlled_delay_size(
|
||||
|
||||
fqcd = FQ_CODEL(qdisc);
|
||||
|
||||
if (streq(lvalue, "FairQueuingControlledDelayMemoryLimit"))
|
||||
if (streq(lvalue, "MemoryLimit"))
|
||||
p = &fqcd->memory_limit;
|
||||
else if (streq(lvalue, "FairQueuingControlledDelayQuantum"))
|
||||
else if (streq(lvalue, "Quantum"))
|
||||
p = &fqcd->quantum;
|
||||
else
|
||||
assert_not_reached("Invalid lvalue.");
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
if (streq(lvalue, "FairQueuingControlledMemoryLimit"))
|
||||
if (streq(lvalue, "MemoryLimit"))
|
||||
*p = UINT32_MAX;
|
||||
else
|
||||
*p = 0;
|
||||
@@ -339,8 +339,8 @@ int config_parse_tc_fair_queuing_controlled_delay_size(
|
||||
}
|
||||
|
||||
const QDiscVTable fq_codel_vtable = {
|
||||
.object_size = sizeof(FairQueuingControlledDelay),
|
||||
.object_size = sizeof(FairQueueingControlledDelay),
|
||||
.tca_kind = "fq_codel",
|
||||
.init = fair_queuing_controlled_delay_init,
|
||||
.fill_message = fair_queuing_controlled_delay_fill_message,
|
||||
.init = fair_queueing_controlled_delay_init,
|
||||
.fill_message = fair_queueing_controlled_delay_fill_message,
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "qdisc.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct FairQueuingControlledDelay {
|
||||
typedef struct FairQueueingControlledDelay {
|
||||
QDisc meta;
|
||||
|
||||
uint32_t packet_limit;
|
||||
@@ -17,12 +17,12 @@ typedef struct FairQueuingControlledDelay {
|
||||
usec_t interval_usec;
|
||||
usec_t ce_threshold_usec;
|
||||
int ecn;
|
||||
} FairQueuingControlledDelay;
|
||||
} FairQueueingControlledDelay;
|
||||
|
||||
DEFINE_QDISC_CAST(FQ_CODEL, FairQueuingControlledDelay);
|
||||
DEFINE_QDISC_CAST(FQ_CODEL, FairQueueingControlledDelay);
|
||||
extern const QDiscVTable fq_codel_vtable;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queuing_controlled_delay_u32);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queuing_controlled_delay_usec);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queuing_controlled_delay_bool);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queuing_controlled_delay_size);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_u32);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_usec);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_bool);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queueing_controlled_delay_size);
|
||||
|
||||
@@ -102,7 +102,7 @@ static int fair_queue_traffic_policing_fill_message(Link *link, QDisc *qdisc, sd
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queue_traffic_policing_u32(
|
||||
int config_parse_fair_queue_traffic_policing_u32(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -134,13 +134,13 @@ int config_parse_tc_fair_queue_traffic_policing_u32(
|
||||
|
||||
fq = FQ(qdisc);
|
||||
|
||||
if (streq(lvalue, "FairQueueTrafficPolicingPacketLimit"))
|
||||
if (streq(lvalue, "PacketLimit"))
|
||||
p = &fq->packet_limit;
|
||||
else if (streq(lvalue, "FairQueueTrafficPolicingFlowLimit"))
|
||||
else if (streq(lvalue, "FlowLimit"))
|
||||
p = &fq->flow_limit;
|
||||
else if (streq(lvalue, "FairQueueTrafficPolicingBuckets"))
|
||||
else if (streq(lvalue, "Buckets"))
|
||||
p = &fq->buckets;
|
||||
else if (streq(lvalue, "FairQueueTrafficPolicingOrphanMask"))
|
||||
else if (streq(lvalue, "OrphanMask"))
|
||||
p = &fq->orphan_mask;
|
||||
else
|
||||
assert_not_reached("Invalid lvalue");
|
||||
@@ -165,7 +165,7 @@ int config_parse_tc_fair_queue_traffic_policing_u32(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queue_traffic_policing_size(
|
||||
int config_parse_fair_queue_traffic_policing_size(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -198,9 +198,9 @@ int config_parse_tc_fair_queue_traffic_policing_size(
|
||||
|
||||
fq = FQ(qdisc);
|
||||
|
||||
if (streq(lvalue, "FairQueueTrafficPolicingQuantum"))
|
||||
if (streq(lvalue, "Quantum"))
|
||||
p = &fq->quantum;
|
||||
else if (streq(lvalue, "FairQueueTrafficPolicingInitialQuantum"))
|
||||
else if (streq(lvalue, "InitialQuantum"))
|
||||
p = &fq->initial_quantum;
|
||||
else
|
||||
assert_not_reached("Invalid lvalue");
|
||||
@@ -232,7 +232,7 @@ int config_parse_tc_fair_queue_traffic_policing_size(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queue_traffic_policing_bool(
|
||||
int config_parse_fair_queue_traffic_policing_bool(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -284,7 +284,7 @@ int config_parse_tc_fair_queue_traffic_policing_bool(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queue_traffic_policing_usec(
|
||||
int config_parse_fair_queue_traffic_policing_usec(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -343,7 +343,7 @@ int config_parse_tc_fair_queue_traffic_policing_usec(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_fair_queue_traffic_policing_max_rate(
|
||||
int config_parse_fair_queue_traffic_policing_max_rate(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
|
||||
@@ -22,8 +22,8 @@ typedef struct FairQueueTrafficPolicing {
|
||||
DEFINE_QDISC_CAST(FQ, FairQueueTrafficPolicing);
|
||||
extern const QDiscVTable fq_vtable;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queue_traffic_policing_u32);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queue_traffic_policing_size);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queue_traffic_policing_bool);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queue_traffic_policing_usec);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_fair_queue_traffic_policing_max_rate);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queue_traffic_policing_u32);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queue_traffic_policing_size);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queue_traffic_policing_bool);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queue_traffic_policing_usec);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_fair_queue_traffic_policing_max_rate);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "networkd-manager.h"
|
||||
#include "parse-util.h"
|
||||
#include "qdisc.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "tc-util.h"
|
||||
|
||||
static int network_emulator_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
|
||||
@@ -54,7 +54,7 @@ static int network_emulator_fill_message(Link *link, QDisc *qdisc, sd_netlink_me
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_network_emulator_delay(
|
||||
int config_parse_network_emulator_delay(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -87,9 +87,9 @@ int config_parse_tc_network_emulator_delay(
|
||||
ne = NETEM(qdisc);
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
if (streq(lvalue, "NetworkEmulatorDelaySec"))
|
||||
if (STR_IN_SET(lvalue, "DelaySec", "NetworkEmulatorDelaySec"))
|
||||
ne->delay = USEC_INFINITY;
|
||||
else if (streq(lvalue, "NetworkEmulatorDelayJitterSec"))
|
||||
else if (STR_IN_SET(lvalue, "DelayJitterSec", "NetworkEmulatorDelayJitterSec"))
|
||||
ne->jitter = USEC_INFINITY;
|
||||
|
||||
qdisc = NULL;
|
||||
@@ -104,9 +104,9 @@ int config_parse_tc_network_emulator_delay(
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (streq(lvalue, "NetworkEmulatorDelaySec"))
|
||||
if (STR_IN_SET(lvalue, "DelaySec", "NetworkEmulatorDelaySec"))
|
||||
ne->delay = u;
|
||||
else if (streq(lvalue, "NetworkEmulatorDelayJitterSec"))
|
||||
else if (STR_IN_SET(lvalue, "DelayJitterSec", "NetworkEmulatorDelayJitterSec"))
|
||||
ne->jitter = u;
|
||||
|
||||
qdisc = NULL;
|
||||
@@ -114,7 +114,7 @@ int config_parse_tc_network_emulator_delay(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_network_emulator_rate(
|
||||
int config_parse_network_emulator_rate(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -147,9 +147,9 @@ int config_parse_tc_network_emulator_rate(
|
||||
ne = NETEM(qdisc);
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
if (streq(lvalue, "NetworkEmulatorLossRate"))
|
||||
if (STR_IN_SET(lvalue, "LossRate", "NetworkEmulatorLossRate"))
|
||||
ne->loss = 0;
|
||||
else if (streq(lvalue, "NetworkEmulatorDuplicateRate"))
|
||||
else if (STR_IN_SET(lvalue, "DuplicateRate", "NetworkEmulatorDuplicateRate"))
|
||||
ne->duplicate = 0;
|
||||
|
||||
qdisc = NULL;
|
||||
@@ -164,16 +164,16 @@ int config_parse_tc_network_emulator_rate(
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (streq(lvalue, "NetworkEmulatorLossRate"))
|
||||
if (STR_IN_SET(lvalue, "LossRate", "NetworkEmulatorLossRate"))
|
||||
ne->loss = rate;
|
||||
else if (streq(lvalue, "NetworkEmulatorDuplicateRate"))
|
||||
else if (STR_IN_SET(lvalue, "DuplicateRate", "NetworkEmulatorDuplicateRate"))
|
||||
ne->duplicate = rate;
|
||||
|
||||
qdisc = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_network_emulator_packet_limit(
|
||||
int config_parse_network_emulator_packet_limit(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -214,8 +214,8 @@ int config_parse_tc_network_emulator_packet_limit(
|
||||
r = safe_atou(rvalue, &ne->limit);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, r,
|
||||
"Failed to parse 'NetworkEmulatorPacketLimit=', ignoring assignment: %s",
|
||||
rvalue);
|
||||
"Failed to parse '%s=', ignoring assignment: %s",
|
||||
lvalue, rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ typedef struct NetworkEmulator {
|
||||
DEFINE_QDISC_CAST(NETEM, NetworkEmulator);
|
||||
extern const QDiscVTable netem_vtable;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_network_emulator_delay);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_network_emulator_rate);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_network_emulator_packet_limit);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_delay);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_rate);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_network_emulator_packet_limit);
|
||||
|
||||
@@ -234,7 +234,7 @@ int qdisc_section_verify(QDisc *qdisc, bool *has_root, bool *has_clsact) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_qdiscs_parent(
|
||||
int config_parse_qdisc_parent(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -254,8 +254,9 @@ int config_parse_tc_qdiscs_parent(
|
||||
assert(lvalue);
|
||||
assert(rvalue);
|
||||
assert(data);
|
||||
assert(ltype >= 0 && ltype < _QDISC_KIND_MAX);
|
||||
|
||||
r = qdisc_new_static(_QDISC_KIND_INVALID, network, filename, section_line, &qdisc);
|
||||
r = qdisc_new_static(ltype, network, filename, section_line, &qdisc);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ int qdisc_section_verify(QDisc *qdisc, bool *has_root, bool *has_clsact);
|
||||
|
||||
DEFINE_NETWORK_SECTION_FUNCTIONS(QDisc, qdisc_free);
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_qdiscs_parent);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_qdisc_parent);
|
||||
|
||||
#include "codel.h"
|
||||
#include "fq-codel.h"
|
||||
|
||||
@@ -31,7 +31,7 @@ static int stochastic_fairness_queueing_fill_message(Link *link, QDisc *qdisc, s
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_stochastic_fairness_queueing_perturb_period(
|
||||
int config_parse_stochastic_fairness_queueing_perturb_period(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
|
||||
@@ -15,4 +15,4 @@ typedef struct StochasticFairnessQueueing {
|
||||
DEFINE_QDISC_CAST(SFQ, StochasticFairnessQueueing);
|
||||
extern const QDiscVTable sfq_vtable;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_stochastic_fairness_queueing_perturb_period);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_stochastic_fairness_queueing_perturb_period);
|
||||
|
||||
@@ -110,7 +110,7 @@ static int token_buffer_filter_fill_message(Link *link, QDisc *qdisc, sd_netlink
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_token_buffer_filter_size(
|
||||
int config_parse_token_buffer_filter_size(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -143,17 +143,17 @@ int config_parse_tc_token_buffer_filter_size(
|
||||
tbf = TBF(qdisc);
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
if (streq(lvalue, "TokenBufferFilterRate"))
|
||||
if (streq(lvalue, "Rate"))
|
||||
tbf->rate = 0;
|
||||
else if (streq(lvalue, "TokenBufferFilterBurst"))
|
||||
else if (streq(lvalue, "Burst"))
|
||||
tbf->burst = 0;
|
||||
else if (streq(lvalue, "TokenBufferFilterLimitSize"))
|
||||
else if (streq(lvalue, "LimitSize"))
|
||||
tbf->limit = 0;
|
||||
else if (streq(lvalue, "TokenBufferFilterMTUBytes"))
|
||||
else if (streq(lvalue, "MTUBytes"))
|
||||
tbf->mtu = 0;
|
||||
else if (streq(lvalue, "TokenBufferFilterMPUBytes"))
|
||||
else if (streq(lvalue, "MPUBytes"))
|
||||
tbf->mpu = 0;
|
||||
else if (streq(lvalue, "TokenBufferFilterPeakRate"))
|
||||
else if (streq(lvalue, "PeakRate"))
|
||||
tbf->peak_rate = 0;
|
||||
|
||||
qdisc = NULL;
|
||||
@@ -168,17 +168,17 @@ int config_parse_tc_token_buffer_filter_size(
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (streq(lvalue, "TokenBufferFilterRate"))
|
||||
if (streq(lvalue, "Rate"))
|
||||
tbf->rate = k / 8;
|
||||
else if (streq(lvalue, "TokenBufferFilterBurst"))
|
||||
else if (streq(lvalue, "Burst"))
|
||||
tbf->burst = k;
|
||||
else if (streq(lvalue, "TokenBufferFilterLimitSize"))
|
||||
else if (streq(lvalue, "LimitSize"))
|
||||
tbf->limit = k;
|
||||
else if (streq(lvalue, "TokenBufferFilterMPUBytes"))
|
||||
else if (streq(lvalue, "MPUBytes"))
|
||||
tbf->mpu = k;
|
||||
else if (streq(lvalue, "TokenBufferFilterMTUBytes"))
|
||||
else if (streq(lvalue, "MTUBytes"))
|
||||
tbf->mtu = k;
|
||||
else if (streq(lvalue, "TokenBufferFilterPeakRate"))
|
||||
else if (streq(lvalue, "PeakRate"))
|
||||
tbf->peak_rate = k / 8;
|
||||
|
||||
qdisc = NULL;
|
||||
@@ -186,7 +186,7 @@ int config_parse_tc_token_buffer_filter_size(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tc_token_buffer_filter_latency(
|
||||
int config_parse_token_buffer_filter_latency(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -245,32 +245,32 @@ static int token_buffer_filter_verify(QDisc *qdisc) {
|
||||
|
||||
if (tbf->limit > 0 && tbf->latency > 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: Specifying both TokenBufferFilterLimitSize= and TokenBufferFilterLatencySec= is not allowed. "
|
||||
"Ignoring [TrafficControlQueueingDiscipline] section from line %u.",
|
||||
"%s: Specifying both LimitSize= and LatencySec= is not allowed. "
|
||||
"Ignoring [TokenBufferFilter] section from line %u.",
|
||||
qdisc->section->filename, qdisc->section->line);
|
||||
|
||||
if (tbf->limit == 0 && tbf->latency == 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: Either TokenBufferFilterLimitSize= or TokenBufferFilterLatencySec= is required. "
|
||||
"Ignoring [TrafficControlQueueingDiscipline] section from line %u.",
|
||||
"%s: Either LimitSize= or LatencySec= is required. "
|
||||
"Ignoring [TokenBufferFilter] section from line %u.",
|
||||
qdisc->section->filename, qdisc->section->line);
|
||||
|
||||
if (tbf->rate == 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: TokenBufferFilterRate= is mandatory. "
|
||||
"Ignoring [TrafficControlQueueingDiscipline] section from line %u.",
|
||||
"%s: Rate= is mandatory. "
|
||||
"Ignoring [TokenBufferFilter] section from line %u.",
|
||||
qdisc->section->filename, qdisc->section->line);
|
||||
|
||||
if (tbf->burst == 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: TokenBufferFilterBurst= is mandatory. "
|
||||
"Ignoring [TrafficControlQueueingDiscipline] section from line %u.",
|
||||
"%s: Burst= is mandatory. "
|
||||
"Ignoring [TokenBufferFilter] section from line %u.",
|
||||
qdisc->section->filename, qdisc->section->line);
|
||||
|
||||
if (tbf->peak_rate > 0 && tbf->mtu == 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: TokenBufferFilterMTUBytes= is mandatory when TokenBufferFilterPeakRate= is specified. "
|
||||
"Ignoring [TrafficControlQueueingDiscipline] section from line %u.",
|
||||
"%s: MTUBytes= is mandatory when PeakRate= is specified. "
|
||||
"Ignoring [TokenBufferFilter] section from line %u.",
|
||||
qdisc->section->filename, qdisc->section->line);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -21,5 +21,5 @@ typedef struct TokenBufferFilter {
|
||||
DEFINE_QDISC_CAST(TBF, TokenBufferFilter);
|
||||
extern const QDiscVTable tbf_vtable;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_token_buffer_filter_latency);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tc_token_buffer_filter_size);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_token_buffer_filter_latency);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_token_buffer_filter_size);
|
||||
|
||||
@@ -270,6 +270,53 @@ SendOption=
|
||||
[NextHop]
|
||||
Id=
|
||||
Gateway=
|
||||
[NetworkEmulator]
|
||||
Parent=
|
||||
DelaySec=
|
||||
DelayJitterSec=
|
||||
LossRate=
|
||||
DuplicateRate=
|
||||
PacketLimit=
|
||||
[TokenBufferFilter]
|
||||
Parent=
|
||||
Rate=
|
||||
Burst=
|
||||
LimitSize=
|
||||
MTUBytes=
|
||||
MPUBytes=
|
||||
PeakRate=
|
||||
LatencySec=
|
||||
[StochasticFairnessQueueing]
|
||||
Parent=
|
||||
PerturbPeriodSec=
|
||||
[FairQueueingControlledDelay]
|
||||
Parent=
|
||||
PacketLimit=
|
||||
MemoryLimit=
|
||||
Flows=
|
||||
Quantum=
|
||||
TargetSec=
|
||||
IntervalSec=
|
||||
CEThresholdSec=
|
||||
ECN=
|
||||
[FairQueueTrafficPolicing]
|
||||
Parent=
|
||||
PacketLimit=
|
||||
FlowLimit=
|
||||
Quantum=
|
||||
InitialQuantum=
|
||||
MaximumRate=
|
||||
Buckets=
|
||||
OrphanMask=
|
||||
Pacing=
|
||||
CEThresholdSec=
|
||||
[ControlledDelay]
|
||||
Parent=
|
||||
PacketLimit=
|
||||
TargetSec=
|
||||
IntervalSec=
|
||||
CEThresholdSec=
|
||||
ECN=
|
||||
[TrafficControlQueueingDiscipline]
|
||||
Parent=
|
||||
NetworkEmulatorDelaySec=
|
||||
@@ -277,33 +324,3 @@ NetworkEmulatorDelayJitterSec=
|
||||
NetworkEmulatorLossRate=
|
||||
NetworkEmulatorDuplicateRate=
|
||||
NetworkEmulatorPacketLimit=
|
||||
TokenBufferFilterRate=
|
||||
TokenBufferFilterBurst=
|
||||
TokenBufferFilterLimitSize=
|
||||
TokenBufferFilterMTUBytes=
|
||||
TokenBufferFilterMPUBytes=
|
||||
TokenBufferFilterPeakRate=
|
||||
TokenBufferFilterLatencySec=
|
||||
StochasticFairnessQueueingPerturbPeriodSec=
|
||||
FairQueuingControlledDelayPacketLimit=
|
||||
FairQueuingControlledDelayMemoryLimit=
|
||||
FairQueuingControlledDelayFlows=
|
||||
FairQueuingControlledDelayQuantum=
|
||||
FairQueuingControlledDelayTargetSec=
|
||||
FairQueuingControlledDelayIntervalSec=
|
||||
FairQueuingControlledDelayCEThresholdSec=
|
||||
FairQueuingControlledDelayECN=
|
||||
FairQueueTrafficPolicingPacketLimit=
|
||||
FairQueueTrafficPolicingFlowLimit=
|
||||
FairQueueTrafficPolicingQuantum=
|
||||
FairQueueTrafficPolicingInitialQuantum=
|
||||
FairQueueTrafficPolicingMaximumRate=
|
||||
FairQueueTrafficPolicingBuckets=
|
||||
FairQueueTrafficPolicingOrphanMask=
|
||||
FairQueueTrafficPolicingPacing=
|
||||
FairQueueTrafficPolicingCEThresholdSec=
|
||||
ControlledDelayPacketLimit=
|
||||
ControlledDelayTargetSec=
|
||||
ControlledDelayIntervalSec=
|
||||
ControlledDelayCEThresholdSec=
|
||||
ControlledDelayECN=
|
||||
|
||||
@@ -5,22 +5,22 @@ Name=dummy98
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[TrafficControlQueueingDiscipline]
|
||||
[FairQueueTrafficPolicing]
|
||||
Parent=root
|
||||
FairQueueTrafficPolicingPacketLimit=1000
|
||||
FairQueueTrafficPolicingFlowLimit=200
|
||||
FairQueueTrafficPolicingQuantum=1500
|
||||
FairQueueTrafficPolicingInitialQuantum=13000
|
||||
FairQueueTrafficPolicingMaximumRate=1M
|
||||
FairQueueTrafficPolicingBuckets=512
|
||||
FairQueueTrafficPolicingOrphanMask=511
|
||||
FairQueueTrafficPolicingPacing=yes
|
||||
FairQueueTrafficPolicingCEThresholdSec=100ms
|
||||
PacketLimit=1000
|
||||
FlowLimit=200
|
||||
Quantum=1500
|
||||
InitialQuantum=13000
|
||||
MaximumRate=1M
|
||||
Buckets=512
|
||||
OrphanMask=511
|
||||
Pacing=yes
|
||||
CEThresholdSec=100ms
|
||||
|
||||
[TrafficControlQueueingDiscipline]
|
||||
[ControlledDelay]
|
||||
Parent=clsact
|
||||
ControlledDelayPacketLimit=2000
|
||||
ControlledDelayTargetSec=10ms
|
||||
ControlledDelayIntervalSec=50ms
|
||||
ControlledDelayECN=yes
|
||||
ControlledDelayCEThresholdSec=100ms
|
||||
PacketLimit=2000
|
||||
TargetSec=10ms
|
||||
IntervalSec=50ms
|
||||
ECN=yes
|
||||
CEThresholdSec=100ms
|
||||
|
||||
@@ -5,20 +5,20 @@ Name=dummy98
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[TrafficControlQueueingDiscipline]
|
||||
[NetworkEmulator]
|
||||
Parent=root
|
||||
NetworkEmulatorDelaySec=50ms
|
||||
NetworkEmulatorDelayJitterSec=10ms
|
||||
NetworkEmulatorLossRate=20%
|
||||
NetworkEmulatorPacketLimit=100
|
||||
DelaySec=50ms
|
||||
DelayJitterSec=10ms
|
||||
LossRate=20%
|
||||
PacketLimit=100
|
||||
|
||||
[TrafficControlQueueingDiscipline]
|
||||
[FairQueueingControlledDelay]
|
||||
Parent=ingress
|
||||
FairQueuingControlledDelayPacketLimit=20480
|
||||
FairQueuingControlledDelayMemoryLimit=64M
|
||||
FairQueuingControlledDelayFlows=2048
|
||||
FairQueuingControlledDelayTargetSec=10ms
|
||||
FairQueuingControlledDelayIntervalSec=200ms
|
||||
FairQueuingControlledDelayQuantum=1400
|
||||
FairQueuingControlledDelayECN=yes
|
||||
FairQueuingControlledDelayCEThresholdSec=100ms
|
||||
PacketLimit=20480
|
||||
MemoryLimit=64M
|
||||
Flows=2048
|
||||
TargetSec=10ms
|
||||
IntervalSec=200ms
|
||||
Quantum=1400
|
||||
ECN=yes
|
||||
CEThresholdSec=100ms
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user