Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
* [Cake] Fresh from the bakery
@ 2015-10-15 11:55 Kevin Darbyshire-Bryant
  2015-10-16  1:11 ` Jonathan Morton
  2015-10-16  9:39 ` Loganaden Velvindron
  0 siblings, 2 replies; 7+ messages in thread
From: Kevin Darbyshire-Bryant @ 2015-10-15 11:55 UTC (permalink / raw)
  To: cake

[-- Attachment #1: Type: text/plain, Size: 2805 bytes --]

Hi list,

Jonathan has been slaving over the oven (again) and produced a fresh
batch of commits, this time for the iproute2/tc userland side of things
(announced in another email on this list)  This means that the cake
qdisc module & tc will talk to one another again with a few new whizzy
features (and sprinkles!)

I've just merged those changes into Dave's 'tc-adv' repo, compiled &
run(ning) then here on an Archer C7.  I've not *yet* updated the
ceropackages repo to point to the latest sch-cake & tc-adv so it's not
'openwrt' wide at this time.

Warning:  Since the ABI/API changed, you'll likely need to update both
the kernel module & userland tc - nothing should burst into flames but
'missing stats' output from tc is a sure sign that cake tray & tin are
not in alignment.


Note the new 'rtt' parameter:

# tc qdisc change cake help
Usage: ... cake [ bandwidth RATE | unlimited* ]
                [ rtt TIME | datacentre | lan | metro | regional |
internet* | oceanic | satellite | interplanetary ]
                [ besteffort | squash | precedence | diffserv8 |
diffserv4* ]
                [ flowblind | srchost | dsthost | hosts | flows* ]
                [ atm | noatm* ] [ overhead N | conservative | raw* ]
    (* marks defaults)


And the stats:

# tc -s qdisc show dev eth0
qdisc cake 800a: root refcnt 2 bandwidth 9800Kbit diffserv4 flows rtt
100.0ms noatm overhead 12
 Sent 1580471 bytes 15158 pkt (dropped 0, overlimits 627 requeues 0)
 backlog 0b 0p requeues 0
             Tin 0       Tin 1       Tin 2       Tin 3 
  thresh    9800Kbit    9187Kbit    7350Kbit    2450Kbit
  target       5.0ms       5.0ms       5.0ms       7.4ms
interval     100.0ms     100.0ms     100.0ms     102.4ms
Pk-delay         0us       381us         2us         1us
Av-delay         0us        10us         0us         0us
Sp-delay         0us         1us         0us         0us
  pkts             0       15053          66          39
  bytes            0     1565352        5940        9179
way-inds           0          43           0           0
way-miss           0         900          66          11
way-cols           0           0           0           0
  drops            0           0           0           0
  marks            0           0           0           0
Sp-flows           0           0           1           0
Bk-flows           0           2           0           2
last-len           0          82          90         225
max-len            0        1514          90         485

qdisc ingress ffff: parent ffff:fff1 ----------------
 Sent 12901461 bytes 20356 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0


Note how traffic is classified into Tins, not Classes or Bins :-)

Enjoy!



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4816 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cake] Fresh from the bakery
  2015-10-15 11:55 [Cake] Fresh from the bakery Kevin Darbyshire-Bryant
@ 2015-10-16  1:11 ` Jonathan Morton
  2015-10-16  9:39 ` Loganaden Velvindron
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Morton @ 2015-10-16  1:11 UTC (permalink / raw)
  To: Kevin Darbyshire-Bryant; +Cc: cake


> On 15 Oct, 2015, at 14:55, Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> wrote:
> 
> Jonathan has been slaving over the oven (again) and produced a fresh
> batch of commits, this time for the iproute2/tc userland side of things
> (announced in another email on this list)  This means that the cake
> qdisc module & tc will talk to one another again with a few new whizzy
> features (and sprinkles!)

Another new feature, highly experimental, just went in.  Cake will now dynamically estimate the capacity of its input traffic, and report that through tc.  The capacity estimate can be significantly higher than the shaped rate, because it examines the input timings, not the output.  Note that it doesn’t yet account for packet overhead.

I anticipate it may be useful for tuning ingress shaping.  In future, it may be possible to automatically set the shaping rate in such configurations - particularly useful for cases where the capacity is variable on a diurnal and/or coverage basis.

Now, let’s see what I can do about dual isolation...

 - Jonathan Morton


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cake] Fresh from the bakery
  2015-10-15 11:55 [Cake] Fresh from the bakery Kevin Darbyshire-Bryant
  2015-10-16  1:11 ` Jonathan Morton
@ 2015-10-16  9:39 ` Loganaden Velvindron
  2015-10-16 10:24   ` Loganaden Velvindron
  1 sibling, 1 reply; 7+ messages in thread
From: Loganaden Velvindron @ 2015-10-16  9:39 UTC (permalink / raw)
  To: Kevin Darbyshire-Bryant; +Cc: cake

[-- Attachment #1: Type: text/plain, Size: 3854 bytes --]

On Thu, Oct 15, 2015 at 3:55 PM, Kevin Darbyshire-Bryant <
kevin@darbyshire-bryant.me.uk> wrote:

> Hi list,
>
> Jonathan has been slaving over the oven (again) and produced a fresh
> batch of commits, this time for the iproute2/tc userland side of things
> (announced in another email on this list)  This means that the cake
> qdisc module & tc will talk to one another again with a few new whizzy
> features (and sprinkles!)
>
> I've just merged those changes into Dave's 'tc-adv' repo, compiled &
> run(ning) then here on an Archer C7.  I've not *yet* updated the
> ceropackages repo to point to the latest sch-cake & tc-adv so it's not
> 'openwrt' wide at this time.
>
> Warning:  Since the ABI/API changed, you'll likely need to update both
> the kernel module & userland tc - nothing should burst into flames but
> 'missing stats' output from tc is a sure sign that cake tray & tin are
> not in alignment.
>
>
> Note the new 'rtt' parameter:
>
> # tc qdisc change cake help
> Usage: ... cake [ bandwidth RATE | unlimited* ]
>                 [ rtt TIME | datacentre | lan | metro | regional |
> internet* | oceanic | satellite | interplanetary ]
>                 [ besteffort | squash | precedence | diffserv8 |
> diffserv4* ]
>                 [ flowblind | srchost | dsthost | hosts | flows* ]
>                 [ atm | noatm* ] [ overhead N | conservative | raw* ]
>     (* marks defaults)
>
>
> And the stats:
>
> # tc -s qdisc show dev eth0
> qdisc cake 800a: root refcnt 2 bandwidth 9800Kbit diffserv4 flows rtt
> 100.0ms noatm overhead 12
>  Sent 1580471 bytes 15158 pkt (dropped 0, overlimits 627 requeues 0)
>  backlog 0b 0p requeues 0
>              Tin 0       Tin 1       Tin 2       Tin 3
>   thresh    9800Kbit    9187Kbit    7350Kbit    2450Kbit
>   target       5.0ms       5.0ms       5.0ms       7.4ms
> interval     100.0ms     100.0ms     100.0ms     102.4ms
> Pk-delay         0us       381us         2us         1us
> Av-delay         0us        10us         0us         0us
> Sp-delay         0us         1us         0us         0us
>   pkts             0       15053          66          39
>   bytes            0     1565352        5940        9179
> way-inds           0          43           0           0
> way-miss           0         900          66          11
> way-cols           0           0           0           0
>   drops            0           0           0           0
>   marks            0           0           0           0
> Sp-flows           0           0           1           0
> Bk-flows           0           2           0           2
> last-len           0          82          90         225
> max-len            0        1514          90         485
>
> qdisc ingress ffff: parent ffff:fff1 ----------------
>  Sent 12901461 bytes 20356 pkt (dropped 0, overlimits 0 requeues 0)
>  backlog 0b 0p requeues 0
>
>
> Note how traffic is classified into Tins, not Classes or Bins :-)
>
> Enjoy!
>
>
>
Building the latest tc-adv causes issues with gcc.


gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations
-Wold-style-definition -Wformat=2 -O2 -I../include -DRESOLVE_HOSTNAMES
-DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE
 -DHAVE_SETNS -DHAVE_ELF -DCONFIG_GACT -DCONFIG_GACT_PROB
-DIPT_LIB_DIR=\"/usr/lib/iptables\" -DYY_NO_INPUT   -c -o q_cake0.o
q_cake0.c
In file included from q_cake.c:48:0:
q_cake.c: In function ‘cake_print_xstats’:../include/utils.h:177:55: error:
expected expression before ‘)’ token # define offsetof(type, member) (
(size_t) & ( (type *) 0 )->member )
              ^q_cake.c:500:31: note: in expansion of macro ‘offsetof’
     && RTA_PAYLOAD(xstats) >= offsetof(*stnc, capacity_estimate))

GCC version:
gcc version 5.2.0 (GCC)

[-- Attachment #2: Type: text/html, Size: 5098 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cake] Fresh from the bakery
  2015-10-16  9:39 ` Loganaden Velvindron
@ 2015-10-16 10:24   ` Loganaden Velvindron
  2015-10-16 13:18     ` Jonathan Morton
  2015-10-16 13:27     ` Kevin Darbyshire-Bryant
  0 siblings, 2 replies; 7+ messages in thread
From: Loganaden Velvindron @ 2015-10-16 10:24 UTC (permalink / raw)
  To: Kevin Darbyshire-Bryant; +Cc: cake

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

On Fri, Oct 16, 2015 at 1:39 PM, Loganaden Velvindron <loganaden@gmail.com>
wrote:

>
>>
> Building the latest tc-adv causes issues with gcc.
>
>
> gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations
> -Wold-style-definition -Wformat=2 -O2 -I../include -DRESOLVE_HOSTNAMES
> -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE
>  -DHAVE_SETNS -DHAVE_ELF -DCONFIG_GACT -DCONFIG_GACT_PROB
> -DIPT_LIB_DIR=\"/usr/lib/iptables\" -DYY_NO_INPUT   -c -o q_cake0.o
> q_cake0.c
> In file included from q_cake.c:48:0:
> q_cake.c: In function ‘cake_print_xstats’:../include/utils.h:177:55:
> error: expected expression before ‘)’ token # define offsetof(type, member)
> ( (size_t) & ( (type *) 0 )->member )
>                 ^q_cake.c:500:31: note: in expansion of macro ‘offsetof’
>      && RTA_PAYLOAD(xstats) >= offsetof(*stnc, capacity_estimate))
>
> GCC version:
> gcc version 5.2.0 (GCC)
>
>
The commit causing the issue is this one:

https://github.com/dtaht/tc-adv/commit/9b2dc094b2b1526ec4222efc1b0a1d02812def5a

I'm not sure about the fix. here is it:

https://github.com/dtaht/tc-adv/pull/7

[-- Attachment #2: Type: text/html, Size: 2523 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cake] Fresh from the bakery
  2015-10-16 10:24   ` Loganaden Velvindron
@ 2015-10-16 13:18     ` Jonathan Morton
  2015-10-16 13:27     ` Kevin Darbyshire-Bryant
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Morton @ 2015-10-16 13:18 UTC (permalink / raw)
  To: Loganaden Velvindron; +Cc: cake

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

I had noticed and fixed it locally, but forgot to push.

- Jonathan Morton

[-- Attachment #2: Type: text/html, Size: 114 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cake] Fresh from the bakery
  2015-10-16 10:24   ` Loganaden Velvindron
  2015-10-16 13:18     ` Jonathan Morton
@ 2015-10-16 13:27     ` Kevin Darbyshire-Bryant
  2015-10-16 13:37       ` Loganaden Velvindron
  1 sibling, 1 reply; 7+ messages in thread
From: Kevin Darbyshire-Bryant @ 2015-10-16 13:27 UTC (permalink / raw)
  To: Loganaden Velvindron; +Cc: cake

[-- Attachment #1: Type: text/plain, Size: 2241 bytes --]



On 16/10/15 11:24, Loganaden Velvindron wrote:
>
>
> On Fri, Oct 16, 2015 at 1:39 PM, Loganaden Velvindron
> <loganaden@gmail.com <mailto:loganaden@gmail.com>> wrote:
>
>
>
>     Building the latest tc-adv causes issues with gcc.
>
>      
>     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes
>     -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2
>     -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\"
>     -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE  -DHAVE_SETNS -DHAVE_ELF
>     -DCONFIG_GACT -DCONFIG_GACT_PROB
>     -DIPT_LIB_DIR=\"/usr/lib/iptables\" -DYY_NO_INPUT   -c -o
>     q_cake0.o q_cake0.c
>     In file included from q_cake.c:48:0:
>     q_cake.c: In function
>     ‘cake_print_xstats’:../include/utils.h:177:55: error: expected
>     expression before ‘)’ token # define offsetof(type, member) (
>     (size_t) & ( (type *) 0 )->member )                              
>                             ^q_cake.c:500:31: note: in expansion of
>     macro ‘offsetof’
>          && RTA_PAYLOAD(xstats) >= offsetof(*stnc, capacity_estimate))
>
>     GCC version:
>     gcc version 5.2.0 (GCC) 
>
>
> The commit causing the issue is this one:
>
> https://github.com/dtaht/tc-adv/commit/9b2dc094b2b1526ec4222efc1b0a1d02812def5a
>
> I'm not sure about the fix. here is it:
>
> https://github.com/dtaht/tc-adv/pull/7
>
>
>
Hi Logan,

Thanks for the report.  It breaks here too :-( I'm annoyed with myself
for merging the latest, latest, latest commits (around 02:00 my time)
early this morning without at least compile testing them.  I think it
was about 05:00 whilst doing an overnight shift (Aussie MotoGP) and the
box I did it on is a little out of date and slow (would require a
toolchain rebuild which is about 4 hours!)  Normally I at least compile
test.  Oh well, move on...

I'm sure Jonathan will pick this up shortly - In fact as I type this
after just compile testing & installing your fix I notice that he has :-)

Logan, thanks very much for your fix, it's appreciated.  I will however
close your pull request and merge in the (identical!) fix from upstream
to keep the git histories a little closer.

Cheers,

Kevin




[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4816 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cake] Fresh from the bakery
  2015-10-16 13:27     ` Kevin Darbyshire-Bryant
@ 2015-10-16 13:37       ` Loganaden Velvindron
  0 siblings, 0 replies; 7+ messages in thread
From: Loganaden Velvindron @ 2015-10-16 13:37 UTC (permalink / raw)
  To: Kevin Darbyshire-Bryant; +Cc: cake

[-- Attachment #1: Type: text/plain, Size: 2567 bytes --]

On Fri, Oct 16, 2015 at 5:27 PM, Kevin Darbyshire-Bryant <
kevin@darbyshire-bryant.me.uk> wrote:

>
>
> On 16/10/15 11:24, Loganaden Velvindron wrote:
> >
> >
> > On Fri, Oct 16, 2015 at 1:39 PM, Loganaden Velvindron
> > <loganaden@gmail.com <mailto:loganaden@gmail.com>> wrote:
> >
> >
> >
> >     Building the latest tc-adv causes issues with gcc.
> >
> >
> >     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes
> >     -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2
> >     -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\"
> >     -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE  -DHAVE_SETNS -DHAVE_ELF
> >     -DCONFIG_GACT -DCONFIG_GACT_PROB
> >     -DIPT_LIB_DIR=\"/usr/lib/iptables\" -DYY_NO_INPUT   -c -o
> >     q_cake0.o q_cake0.c
> >     In file included from q_cake.c:48:0:
> >     q_cake.c: In function
> >     ‘cake_print_xstats’:../include/utils.h:177:55: error: expected
> >     expression before ‘)’ token # define offsetof(type, member) (
> >     (size_t) & ( (type *) 0 )->member )
> >                             ^q_cake.c:500:31: note: in expansion of
> >     macro ‘offsetof’
> >          && RTA_PAYLOAD(xstats) >= offsetof(*stnc, capacity_estimate))
> >
> >     GCC version:
> >     gcc version 5.2.0 (GCC)
> >
> >
> > The commit causing the issue is this one:
> >
> >
> https://github.com/dtaht/tc-adv/commit/9b2dc094b2b1526ec4222efc1b0a1d02812def5a
> >
> > I'm not sure about the fix. here is it:
> >
> > https://github.com/dtaht/tc-adv/pull/7
> >
> >
> >
> Hi Logan,
>
> Thanks for the report.  It breaks here too :-( I'm annoyed with myself
> for merging the latest, latest, latest commits (around 02:00 my time)
> early this morning without at least compile testing them.  I think it
> was about 05:00 whilst doing an overnight shift (Aussie MotoGP) and the
> box I did it on is a little out of date and slow (would require a
> toolchain rebuild which is about 4 hours!)  Normally I at least compile
> test.  Oh well, move on...
>
> I'm sure Jonathan will pick this up shortly - In fact as I type this
> after just compile testing & installing your fix I notice that he has :-)
>
> Logan, thanks very much for your fix, it's appreciated.  I will however
> close your pull request and merge in the (identical!) fix from upstream
> to keep the git histories a little closer.
>
>
Thanks for updating the master tree. I was working on another issue, when I
encountered this problem with the latest sync :)


> Cheers,
>
> Kevin
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3769 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-16 13:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15 11:55 [Cake] Fresh from the bakery Kevin Darbyshire-Bryant
2015-10-16  1:11 ` Jonathan Morton
2015-10-16  9:39 ` Loganaden Velvindron
2015-10-16 10:24   ` Loganaden Velvindron
2015-10-16 13:18     ` Jonathan Morton
2015-10-16 13:27     ` Kevin Darbyshire-Bryant
2015-10-16 13:37       ` Loganaden Velvindron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox