mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
network: tc/cake: introduce UseRawPacketSize= setting
This commit is contained in:
parent
35896db489
commit
1c7a81e626
@ -3511,6 +3511,15 @@ Token=prefixstable:2002:da8:1::</programlisting></para>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>UseRawPacketSize=</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>Takes a boolean value. When true, the packet size reported by the Linux kernel will be
|
||||||
|
used, instead of the underlying IP packet size. Defaults to unset, and the kernel's default
|
||||||
|
is used.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>FlowIsolationMode=</varname></term>
|
<term><varname>FlowIsolationMode=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -390,6 +390,7 @@ CAKE.AutoRateIngress, config_parse_cake_tristate,
|
|||||||
CAKE.OverheadBytes, config_parse_cake_overhead, QDISC_KIND_CAKE, 0
|
CAKE.OverheadBytes, config_parse_cake_overhead, QDISC_KIND_CAKE, 0
|
||||||
CAKE.MPUBytes, config_parse_cake_mpu, QDISC_KIND_CAKE, 0
|
CAKE.MPUBytes, config_parse_cake_mpu, QDISC_KIND_CAKE, 0
|
||||||
CAKE.CompensationMode, config_parse_cake_compensation_mode, QDISC_KIND_CAKE, 0
|
CAKE.CompensationMode, config_parse_cake_compensation_mode, QDISC_KIND_CAKE, 0
|
||||||
|
CAKE.UseRawPacketSize, config_parse_cake_tristate, QDISC_KIND_CAKE, 0
|
||||||
CAKE.FlowIsolationMode, config_parse_cake_flow_isolation_mode, QDISC_KIND_CAKE, 0
|
CAKE.FlowIsolationMode, config_parse_cake_flow_isolation_mode, QDISC_KIND_CAKE, 0
|
||||||
CAKE.NAT, config_parse_cake_tristate, QDISC_KIND_CAKE, 0
|
CAKE.NAT, config_parse_cake_tristate, QDISC_KIND_CAKE, 0
|
||||||
CAKE.PriorityQueueingPreset, config_parse_cake_priority_queueing_preset, QDISC_KIND_CAKE, 0
|
CAKE.PriorityQueueingPreset, config_parse_cake_priority_queueing_preset, QDISC_KIND_CAKE, 0
|
||||||
|
@ -21,6 +21,7 @@ static int cake_init(QDisc *qdisc) {
|
|||||||
|
|
||||||
c->autorate = -1;
|
c->autorate = -1;
|
||||||
c->compensation_mode = _CAKE_COMPENSATION_MODE_INVALID;
|
c->compensation_mode = _CAKE_COMPENSATION_MODE_INVALID;
|
||||||
|
c->raw = -1;
|
||||||
c->flow_isolation_mode = _CAKE_FLOW_ISOLATION_MODE_INVALID;
|
c->flow_isolation_mode = _CAKE_FLOW_ISOLATION_MODE_INVALID;
|
||||||
c->nat = -1;
|
c->nat = -1;
|
||||||
c->preset = _CAKE_PRESET_INVALID;
|
c->preset = _CAKE_PRESET_INVALID;
|
||||||
@ -74,6 +75,13 @@ 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_ATM attribute: %m");
|
return log_link_error_errno(link, r, "Could not append TCA_CAKE_ATM attribute: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c->raw > 0) {
|
||||||
|
/* TCA_CAKE_RAW attribute is mostly a flag, not boolean. */
|
||||||
|
r = sd_netlink_message_append_u32(req, TCA_CAKE_RAW, 0);
|
||||||
|
if (r < 0)
|
||||||
|
return log_link_error_errno(link, r, "Could not append TCA_CAKE_RAW attribute: %m");
|
||||||
|
}
|
||||||
|
|
||||||
if (c->flow_isolation_mode >= 0) {
|
if (c->flow_isolation_mode >= 0) {
|
||||||
r = sd_netlink_message_append_u32(req, TCA_CAKE_FLOW_MODE, c->flow_isolation_mode);
|
r = sd_netlink_message_append_u32(req, TCA_CAKE_FLOW_MODE, c->flow_isolation_mode);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -326,6 +334,8 @@ int config_parse_cake_tristate(
|
|||||||
|
|
||||||
if (streq(lvalue, "AutoRateIngress"))
|
if (streq(lvalue, "AutoRateIngress"))
|
||||||
dest = &c->autorate;
|
dest = &c->autorate;
|
||||||
|
else if (streq(lvalue, "UseRawPacketSize"))
|
||||||
|
dest = &c->raw;
|
||||||
else if (streq(lvalue, "NAT"))
|
else if (streq(lvalue, "NAT"))
|
||||||
dest = &c->nat;
|
dest = &c->nat;
|
||||||
else if (streq(lvalue, "Wash"))
|
else if (streq(lvalue, "Wash"))
|
||||||
|
@ -50,6 +50,7 @@ typedef struct CommonApplicationsKeptEnhanced {
|
|||||||
int overhead;
|
int overhead;
|
||||||
uint32_t mpu;
|
uint32_t mpu;
|
||||||
CakeCompensationMode compensation_mode;
|
CakeCompensationMode compensation_mode;
|
||||||
|
int raw;
|
||||||
|
|
||||||
/* Flow isolation parameters */
|
/* Flow isolation parameters */
|
||||||
CakeFlowIsolationMode flow_isolation_mode;
|
CakeFlowIsolationMode flow_isolation_mode;
|
||||||
|
@ -472,6 +472,7 @@ AutoRateIngress=
|
|||||||
OverheadBytes=
|
OverheadBytes=
|
||||||
MPUBytes=
|
MPUBytes=
|
||||||
CompensationMode=
|
CompensationMode=
|
||||||
|
UseRawPacketSize=
|
||||||
FlowIsolationMode=
|
FlowIsolationMode=
|
||||||
NAT=
|
NAT=
|
||||||
PriorityQueueingPreset=
|
PriorityQueueingPreset=
|
||||||
|
Loading…
Reference in New Issue
Block a user