* [PATCH v2 iproute2-next] sch_cake: Make gso-splitting configurable
@ 2018-08-13 11:36 Toke Høiland-Jørgensen
2018-08-13 14:45 ` David Ahern
0 siblings, 1 reply; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-08-13 11:36 UTC (permalink / raw)
To: David Ahern; +Cc: netdev, Toke Høiland-Jørgensen, Dave Taht
This patch makes sch_cake's gso/gro splitting configurable
from userspace.
To disable breaking apart superpackets in sch_cake:
tc qdisc replace dev whatever root cake no-split-gso
to enable:
tc qdisc replace dev whatever root cake split-gso
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Dave Taht <dave.taht@gmail.com>
---
v2:
- Fix x-mas tree variable order
- Also update man page
man/man8/tc-cake.8 | 23 +++++++++++++++++++++++
tc/q_cake.c | 9 +++++++++
2 files changed, 32 insertions(+)
diff --git a/man/man8/tc-cake.8 b/man/man8/tc-cake.8
index 0e84bc6e..b8e3089b 100644
--- a/man/man8/tc-cake.8
+++ b/man/man8/tc-cake.8
@@ -73,6 +73,12 @@ TIME |
]
.br
[
+.BR split-gso*
+|
+.BR no-split-gso
+]
+.br
+[
.BR ack-filter
|
.BR ack-filter-aggressive
@@ -546,6 +552,23 @@ If you are shaping inbound, and cannot trust the diffserv markings (as is the
case for Comcast Cable, among others), it is best to use a single queue
"besteffort" mode with wash.
+.PP
+.B split-gso
+
+.br
+ This option controls whether CAKE will split General Segmentation
+Offload (GSO) super-packets into their on-the-wire components and
+dequeue them individually.
+
+.br
+Super-packets are created by the networking stack to improve efficiency.
+However, because they are larger they take longer to dequeue, which
+translates to higher latency for competing flows, especially at lower
+bandwidths. CAKE defaults to splitting GSO packets to achieve the lowest
+possible latency. At link speeds higher than 10 Gbps, setting the
+no-split-gso parameter can increase the maximum achievable throughput by
+retaining the full GSO packets.
+
.SH EXAMPLES
# tc qdisc delete root dev eth0
.br
diff --git a/tc/q_cake.c b/tc/q_cake.c
index f1e232a6..50de46a7 100644
--- a/tc/q_cake.c
+++ b/tc/q_cake.c
@@ -79,6 +79,7 @@ static void explain(void)
" dual-srchost | dual-dsthost | triple-isolate* ]\n"
" [ nat | nonat* ]\n"
" [ wash | nowash* ]\n"
+" [ split-gso* | no-split-gso ]\n"
" [ ack-filter | ack-filter-aggressive | no-ack-filter* ]\n"
" [ memlimit LIMIT ]\n"
" [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
@@ -99,6 +100,7 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
__u64 bandwidth = 0;
int ack_filter = -1;
struct rtattr *tail;
+ int split_gso = -1;
int unlimited = 0;
int flowmode = -1;
int autorate = -1;
@@ -155,6 +157,10 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
wash = 0;
} else if (strcmp(*argv, "wash") == 0) {
wash = 1;
+ } else if (strcmp(*argv, "split-gso") == 0) {
+ split_gso = 1;
+ } else if (strcmp(*argv, "no-split-gso") == 0) {
+ split_gso = 0;
} else if (strcmp(*argv, "flowblind") == 0) {
flowmode = CAKE_FLOW_NONE;
} else if (strcmp(*argv, "srchost") == 0) {
@@ -374,6 +380,9 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
addattr_l(n, 1024, TCA_CAKE_NAT, &nat, sizeof(nat));
if (wash != -1)
addattr_l(n, 1024, TCA_CAKE_WASH, &wash, sizeof(wash));
+ if (split_gso != -1)
+ addattr_l(n, 1024, TCA_CAKE_SPLIT_GSO, &split_gso,
+ sizeof(split_gso));
if (ingress != -1)
addattr_l(n, 1024, TCA_CAKE_INGRESS, &ingress, sizeof(ingress));
if (ack_filter != -1)
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 iproute2-next] sch_cake: Make gso-splitting configurable
2018-08-13 11:36 [PATCH v2 iproute2-next] sch_cake: Make gso-splitting configurable Toke Høiland-Jørgensen
@ 2018-08-13 14:45 ` David Ahern
2018-08-13 16:44 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 3+ messages in thread
From: David Ahern @ 2018-08-13 14:45 UTC (permalink / raw)
To: Toke Høiland-Jørgensen; +Cc: netdev, Dave Taht
On 8/13/18 5:36 AM, Toke Høiland-Jørgensen wrote:
> This patch makes sch_cake's gso/gro splitting configurable
> from userspace.
>
> To disable breaking apart superpackets in sch_cake:
>
> tc qdisc replace dev whatever root cake no-split-gso
>
> to enable:
>
> tc qdisc replace dev whatever root cake split-gso
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Dave Taht <dave.taht@gmail.com>
> ---
applied to iproute2-next. Thanks
I think you also need to display it if the attribute is returned.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 iproute2-next] sch_cake: Make gso-splitting configurable
2018-08-13 14:45 ` David Ahern
@ 2018-08-13 16:44 ` Toke Høiland-Jørgensen
0 siblings, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-08-13 16:44 UTC (permalink / raw)
To: David Ahern; +Cc: netdev, Dave Taht
David Ahern <dsahern@gmail.com> writes:
> On 8/13/18 5:36 AM, Toke Høiland-Jørgensen wrote:
>> This patch makes sch_cake's gso/gro splitting configurable
>> from userspace.
>>
>> To disable breaking apart superpackets in sch_cake:
>>
>> tc qdisc replace dev whatever root cake no-split-gso
>>
>> to enable:
>>
>> tc qdisc replace dev whatever root cake split-gso
>>
>> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
>> Signed-off-by: Dave Taht <dave.taht@gmail.com>
>> ---
>
> applied to iproute2-next. Thanks
Great, thanks :)
> I think you also need to display it if the attribute is returned.
We already print 'split-gso' when it is set; this was previously decided
by the kernel, this change just makes it user-configurable...
-Toke
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-13 19:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-13 11:36 [PATCH v2 iproute2-next] sch_cake: Make gso-splitting configurable Toke Høiland-Jørgensen
2018-08-13 14:45 ` David Ahern
2018-08-13 16:44 ` Toke Høiland-Jørgensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).