Re: [Cake] [PATCH net-next v14 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Marcelo Ricardo Leitner
On Mon, May 21, 2018 at 10:35:58PM +0200, Toke Høiland-Jørgensen wrote: > +static u32 cake_overhead(struct cake_sched_data *q, const struct sk_buff > *skb) > +{ > + const struct skb_shared_info *shinfo = skb_shinfo(skb); > + unsigned int hdr_len, last_len = 0; > + u32 off = skb_network

Re: [Cake] [PATCH net-next v14 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-21 Thread Marcelo Ricardo Leitner
[Cc'ing netfilter-devel@ for awareness] On Mon, May 21, 2018 at 10:35:58PM +0200, Toke Høiland-Jørgensen wrote: > When CAKE is deployed on a gateway that also performs NAT (which is a > common deployment mode), the host fairness mechanism cannot distinguish > internal hosts from each other, and so

Re: [Cake] [PATCH net-next v14 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 01:35 PM, Toke Høiland-Jørgensen wrote: > + > + /* 3 reserved flags must be unset to avoid future breakage > + * ECE/CWR/NS can be safely ignored > + * ACK must be set > + * All other flags URG/PSH/RST/SYN/FIN must be unset > + * 0x0FFF = all TCP flags (

[Cake] [PATCH net-next v14 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-21 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack me

[Cake] [PATCH net-next v14 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature is

[Cake] [PATCH net-next v14 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth 20

[Cake] [PATCH net-next v14 7/7] sch_cake: Conditionally split GSO segments

2018-05-21 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on ban

[Cake] [PATCH net-next v14 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs capab

[Cake] [PATCH net-next v14 5/7] sch_cake: Add DiffServ handling

2018-05-21 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple, three-tier

[Cake] [PATCH net-next v14 2/7] sch_cake: Add ingress mode

2018-05-21 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to alway

[Cake] [PATCH net-next v14 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most d

Re: [Cake] [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 11:08 AM, Eric Dumazet wrote: > > > On 05/21/2018 10:35 AM, Toke Høiland-Jørgensen wrote: > >> Ah yes, sequence number wrapping. I was thinking I needed to deal with >> that, and then got sidetracked and forgot about it. Will fix. >> >> Other than that, do you agree that this app

Re: [Cake] [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 10:35 AM, Toke Høiland-Jørgensen wrote: > Ah yes, sequence number wrapping. I was thinking I needed to deal with > that, and then got sidetracked and forgot about it. Will fix. > > Other than that, do you agree that this approach to SACK and header > handling can work? Unfortunat

Re: [Cake] [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
Eric Dumazet writes: > On 05/21/2018 09:24 AM, Toke Høiland-Jørgensen wrote: > >> +while (oplen_tmp >= 8) { >> +u32 right_b = get_unaligned_be32(sack_tmp + 4); >> +u32 left_b = get_unaligned_be32(sack_tmp); >> + >> +if (left_

Re: [Cake] [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 09:24 AM, Toke Høiland-Jørgensen wrote: > + while (oplen_tmp >= 8) { > + u32 right_b = get_unaligned_be32(sack_tmp + 4); > + u32 left_b = get_unaligned_be32(sack_tmp); > + > + if (left_b >= right_b) > +

[Cake] [PATCH net-next v13 7/7] sch_cake: Conditionally split GSO segments

2018-05-21 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on ban

[Cake] [PATCH net-next v13 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most d

[Cake] [PATCH net-next v13 5/7] sch_cake: Add DiffServ handling

2018-05-21 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple, three-tier

[Cake] [PATCH net-next v13 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth 20

[Cake] [PATCH net-next v13 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature is

[Cake] [PATCH net-next v13 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-21 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack me

[Cake] [PATCH net-next v13 2/7] sch_cake: Add ingress mode

2018-05-21 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to alway

[Cake] [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs capab

Re: [Cake] tc not showing detailed stats

2018-05-21 Thread Toke Høiland-Jørgensen
Georgios Amanakis writes: > Of course you are right. I was using archlinux's build system which > produces the bug somehow. If I compile directly from the source everything > works normal. > > I am sorry for the mess this caused. No worries. We are still debugging another issue like it on openwr

Re: [Cake] tc not showing detailed stats

2018-05-21 Thread Georgios Amanakis
Of course you are right. I was using archlinux's build system which produces the bug somehow. If I compile directly from the source everything works normal. I am sorry for the mess this caused. George On Mon, May 21, 2018, 10:00 AM Toke Høiland-Jørgensen wrote: > Georgios Amanakis writes: >

Re: [Cake] tc not showing detailed stats

2018-05-21 Thread Toke Høiland-Jørgensen
Georgios Amanakis writes: > I am well aware of that :) > On my system though with tc-adv@aa554002 and sch_cake/cobalt@842d7f0 > it doesn't produce any detailed stats: Hmm, the thing is that I can reproduce your error if I use commit d52fe0077637caa1e3a4b1242d2bf935929b8275 in tc-adv I can reprod