<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 15, 2015 at 3:55 PM, Kevin Darbyshire-Bryant <span dir="ltr"><<a href="mailto:kevin@darbyshire-bryant.me.uk" target="_blank">kevin@darbyshire-bryant.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi list,<br>
<br>
Jonathan has been slaving over the oven (again) and produced a fresh<br>
batch of commits, this time for the iproute2/tc userland side of things<br>
(announced in another email on this list)  This means that the cake<br>
qdisc module & tc will talk to one another again with a few new whizzy<br>
features (and sprinkles!)<br>
<br>
I've just merged those changes into Dave's 'tc-adv' repo, compiled &<br>
run(ning) then here on an Archer C7.  I've not *yet* updated the<br>
ceropackages repo to point to the latest sch-cake & tc-adv so it's not<br>
'openwrt' wide at this time.<br>
<br>
Warning:  Since the ABI/API changed, you'll likely need to update both<br>
the kernel module & userland tc - nothing should burst into flames but<br>
'missing stats' output from tc is a sure sign that cake tray & tin are<br>
not in alignment.<br>
<br>
<br>
Note the new 'rtt' parameter:<br>
<br>
# tc qdisc change cake help<br>
Usage: ... cake [ bandwidth RATE | unlimited* ]<br>
                [ rtt TIME | datacentre | lan | metro | regional |<br>
internet* | oceanic | satellite | interplanetary ]<br>
                [ besteffort | squash | precedence | diffserv8 |<br>
diffserv4* ]<br>
                [ flowblind | srchost | dsthost | hosts | flows* ]<br>
                [ atm | noatm* ] [ overhead N | conservative | raw* ]<br>
    (* marks defaults)<br>
<br>
<br>
And the stats:<br>
<br>
# tc -s qdisc show dev eth0<br>
qdisc cake 800a: root refcnt 2 bandwidth 9800Kbit diffserv4 flows rtt<br>
100.0ms noatm overhead 12<br>
 Sent 1580471 bytes 15158 pkt (dropped 0, overlimits 627 requeues 0)<br>
 backlog 0b 0p requeues 0<br>
             Tin 0       Tin 1       Tin 2       Tin 3<br>
  thresh    9800Kbit    9187Kbit    7350Kbit    2450Kbit<br>
  target       5.0ms       5.0ms       5.0ms       7.4ms<br>
interval     100.0ms     100.0ms     100.0ms     102.4ms<br>
Pk-delay         0us       381us         2us         1us<br>
Av-delay         0us        10us         0us         0us<br>
Sp-delay         0us         1us         0us         0us<br>
  pkts             0       15053          66          39<br>
  bytes            0     1565352        5940        9179<br>
way-inds           0          43           0           0<br>
way-miss           0         900          66          11<br>
way-cols           0           0           0           0<br>
  drops            0           0           0           0<br>
  marks            0           0           0           0<br>
Sp-flows           0           0           1           0<br>
Bk-flows           0           2           0           2<br>
last-len           0          82          90         225<br>
max-len            0        1514          90         485<br>
<br>
qdisc ingress ffff: parent ffff:fff1 ----------------<br>
 Sent 12901461 bytes 20356 pkt (dropped 0, overlimits 0 requeues 0)<br>
 backlog 0b 0p requeues 0<br>
<br>
<br>
Note how traffic is classified into Tins, not Classes or Bins :-)<br>
<br>
Enjoy!<br>
<br>
<br></blockquote><div><br></div><div>Building the latest tc-adv causes issues with gcc.</div><div><br></div><div> </div><div><div>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</div><div>In file included from q_cake.c:48:0:</div><div>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’</div><div>     && RTA_PAYLOAD(xstats) >= offsetof(*stnc, capacity_estimate))</div></div><div><br></div><div>GCC version:</div><div>gcc version 5.2.0 (GCC) <br></div><div><br></div></div></div></div>