[Cake] Does the latest cake support "tc filter"?

2018-05-16 Thread Fushan Wen
Hello developers, I've seen the mail in the netdev mailing list, saying "other tc filters supported". So can I use "tc filter" to attach specified traffic to a specified tin without DSCP marks? It's helpful when dealing with ingress traffic where iptables DSCP mark won't work. Thanks in advance.

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

2018-05-16 Thread Toke Høiland-Jørgensen
Cong Wang writes: > On Wed, May 16, 2018 at 1:29 PM, Toke Høiland-Jørgensen wrote: >> + if (tb[TCA_CAKE_AUTORATE]) { >> + if (!!nla_get_u32(tb[TCA_CAKE_AUTORATE])) >> + q->rate_flags |= CAKE_FLAG_AUTORATE_INGRESS;

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

2018-05-16 Thread Cong Wang
On Wed, May 16, 2018 at 1:29 PM, 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 fails to work correctly. > > To

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

2018-05-16 Thread Toke Høiland-Jørgensen
Cong Wang writes: > On Wed, May 16, 2018 at 1:29 PM, 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

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

2018-05-16 Thread Toke Høiland-Jørgensen
Cong Wang writes: > On Wed, May 16, 2018 at 1:29 PM, Toke Høiland-Jørgensen wrote: >> + >> +static struct Qdisc *cake_leaf(struct Qdisc *sch, unsigned long arg) >> +{ >> + return NULL; >> +} >> + >> +static unsigned long cake_find(struct Qdisc *sch,

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

2018-05-16 Thread Cong Wang
On Wed, May 16, 2018 at 1:29 PM, Toke Høiland-Jørgensen wrote: > + > +static struct Qdisc *cake_leaf(struct Qdisc *sch, unsigned long arg) > +{ > + return NULL; > +} > + > +static unsigned long cake_find(struct Qdisc *sch, u32 classid) > +{ > + return 0; > +} > + >

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

2018-05-16 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

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

2018-05-16 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

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

2018-05-16 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

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

2018-05-16 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

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

2018-05-16 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

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

2018-05-16 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

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

2018-05-16 Thread Toke Høiland-Jørgensen
David Miller writes: > From: Toke Høiland-Jørgensen > Date: Tue, 15 May 2018 17:12:44 +0200 > >> +typedef u64 cobalt_time_t; >> +typedef s64 cobalt_tdiff_t; > ... >> +static cobalt_time_t cobalt_get_time(void) >> +{ >> +return ktime_get_ns(); >> +} >> +

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

2018-05-16 Thread David Miller
From: Toke Høiland-Jørgensen Date: Tue, 15 May 2018 17:12:44 +0200 > +typedef u64 cobalt_time_t; > +typedef s64 cobalt_tdiff_t; ... > +static cobalt_time_t cobalt_get_time(void) > +{ > + return ktime_get_ns(); > +} > + > +static u32 cobalt_time_to_us(cobalt_time_t val) > +{ >