mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
network: tc/cake: introduce Wash= setting
This commit is contained in:
parent
049b66ccdd
commit
d05dce95d8
@ -3669,6 +3669,14 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>Wash=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a boolean value. When true, CAKE clears the DSCP fields, except for ECN bits, of
|
||||
any packet passing through CAKE. Defaults to unset, and the kernel's default is used.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
@ -394,6 +394,7 @@ CAKE.FlowIsolationMode, config_parse_cake_flow_isolation_mo
|
||||
CAKE.NAT, config_parse_cake_tristate, QDISC_KIND_CAKE, 0
|
||||
CAKE.PriorityQueueingPreset, config_parse_cake_priority_queueing_preset, QDISC_KIND_CAKE, 0
|
||||
CAKE.FirewallMark, config_parse_cake_fwmark, QDISC_KIND_CAKE, 0
|
||||
CAKE.Wash, config_parse_cake_tristate, QDISC_KIND_CAKE, 0
|
||||
ControlledDelay.Parent, config_parse_qdisc_parent, QDISC_KIND_CODEL, 0
|
||||
ControlledDelay.Handle, config_parse_qdisc_handle, QDISC_KIND_CODEL, 0
|
||||
ControlledDelay.PacketLimit, config_parse_controlled_delay_u32, QDISC_KIND_CODEL, 0
|
||||
|
@ -24,6 +24,7 @@ static int cake_init(QDisc *qdisc) {
|
||||
c->flow_isolation_mode = _CAKE_FLOW_ISOLATION_MODE_INVALID;
|
||||
c->nat = -1;
|
||||
c->preset = _CAKE_PRESET_INVALID;
|
||||
c->wash = -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -96,6 +97,12 @@ static int cake_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req)
|
||||
return log_link_error_errno(link, r, "Could not append TCA_CAKE_FWMARK attribute: %m");
|
||||
}
|
||||
|
||||
if (c->wash >= 0) {
|
||||
r = sd_netlink_message_append_u32(req, TCA_CAKE_WASH, c->wash);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append TCA_CAKE_WASH attribute: %m");
|
||||
}
|
||||
|
||||
r = sd_netlink_message_close_container(req);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not close container TCA_OPTIONS: %m");
|
||||
@ -314,6 +321,8 @@ int config_parse_cake_tristate(
|
||||
dest = &c->autorate;
|
||||
else if (streq(lvalue, "NAT"))
|
||||
dest = &c->nat;
|
||||
else if (streq(lvalue, "Wash"))
|
||||
dest = &c->wash;
|
||||
else
|
||||
assert_not_reached();
|
||||
|
||||
|
@ -59,6 +59,9 @@ typedef struct CommonApplicationsKeptEnhanced {
|
||||
CakePriorityQueueingPreset preset;
|
||||
uint32_t fwmark;
|
||||
|
||||
/* Other parameters */
|
||||
int wash;
|
||||
|
||||
} CommonApplicationsKeptEnhanced;
|
||||
|
||||
DEFINE_QDISC_CAST(CAKE, CommonApplicationsKeptEnhanced);
|
||||
|
@ -476,6 +476,7 @@ FlowIsolationMode=
|
||||
NAT=
|
||||
PriorityQueueingPreset=
|
||||
FirewallMark=
|
||||
Wash=
|
||||
[TrafficControlQueueingDiscipline]
|
||||
Parent=
|
||||
NetworkEmulatorDelaySec=
|
||||
|
Loading…
Reference in New Issue
Block a user