1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

network: tc/cake: introduce SplitGSO= setting

This commit is contained in:
Yu Watanabe 2021-11-04 05:38:13 +09:00
parent d05dce95d8
commit 35896db489
5 changed files with 21 additions and 0 deletions

View File

@ -3677,6 +3677,15 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>SplitGSO=</varname></term>
<listitem>
<para>Takes a boolean value. When true, CAKE will split General Segmentation Offload (GSO)
super-packets into their on-the-wire components and dequeue them individually. Defaults to
unset, and the kernel's default is used.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

View File

@ -395,6 +395,7 @@ CAKE.NAT, config_parse_cake_tristate,
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
CAKE.SplitGSO, 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

View File

@ -25,6 +25,7 @@ static int cake_init(QDisc *qdisc) {
c->nat = -1;
c->preset = _CAKE_PRESET_INVALID;
c->wash = -1;
c->split_gso = -1;
return 0;
}
@ -103,6 +104,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_WASH attribute: %m");
}
if (c->split_gso >= 0) {
r = sd_netlink_message_append_u32(req, TCA_CAKE_SPLIT_GSO, c->wash);
if (r < 0)
return log_link_error_errno(link, r, "Could not append TCA_CAKE_SPLIT_GSO 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");
@ -323,6 +330,8 @@ int config_parse_cake_tristate(
dest = &c->nat;
else if (streq(lvalue, "Wash"))
dest = &c->wash;
else if (streq(lvalue, "SplitGSO"))
dest = &c->split_gso;
else
assert_not_reached();

View File

@ -61,6 +61,7 @@ typedef struct CommonApplicationsKeptEnhanced {
/* Other parameters */
int wash;
int split_gso;
} CommonApplicationsKeptEnhanced;

View File

@ -477,6 +477,7 @@ NAT=
PriorityQueueingPreset=
FirewallMark=
Wash=
SplitGSO=
[TrafficControlQueueingDiscipline]
Parent=
NetworkEmulatorDelaySec=