[Cake] Cake on openwrt - falling behind
Pete Heist
pete at heistp.net
Mon Jul 2 10:51:34 EDT 2018
> On Jul 2, 2018, at 2:03 PM, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>
> Pete Heist <pete at heistp.net> writes:
>
>> But, um, I find it curious that tb[TCA_PAD] has valid looking values
>> in it, and if I just go:
>>
>> tb[TCA_STATS2] = tb[TCA_PAD]
>>
>> right after parse_rtattr is called, I start getting tin stats printed
>> that look valid. There should be zeroes or invalid values at
>> tb[TCA_PAD], as that’s just supposed to be padding, right?
>
> Hmm, that's interesting. Sounds like you are on the right track. What
> are the numerical values of TCA_STATS2 and TCA_PAD in the kernel and
> iproute2, respectively?
I never would’ve guessed they could be different when compiled at once :) but true, there are at least five different versions of rtnetlink.h under build_dir based on their md5sums, and I see one belongs to iproute2-full. In all of those, it looks in the source like TCA_STATS2=7 and TCA_PAD=9. So I presume that the value for tb[TCA_STATS2] is out of place by 64 bits in memory. For interest, current output, which includes the values of TCA_STATS2 and TCA_PAD plus all the values in the rtattr struct after parsing:
root at OpenWrt:/tmp# tc -s -d qdisc show dev eth0
TCA_STATS2 val=00000007
TCA_PAD val=00000009
tb[TCA_UNSPEC]=00000000
tb[TCA_KIND]=77f013fc
tb[TCA_OPTIONS]=77f01408
tb[TCA_STATS]=77f0172c
tb[TCA_XSTATS]=00000000
tb[TCA_RATE]=00000000
tb[TCA_FCNT]=00000000
tb[TCA_STATS2]=00000000
tb[TCA_STAB]=00000000
tb[TCA_PAD]=77f01490
tb[TCA_DUMP_INVISIBLE]=00000000
tb[TCA_CHAIN]=00000000
tb[TCA_HW_OFFLOAD]=00000000
tb[TCA_INGRESS_BLOCK]=00000000
tb[TCA_EGRESS_BLOCK]=00000000
// hack happens here to get valid pointer in tb[TCA_STATS2]: tb[TCA_STATS2] = tb[TCA_PAD]
qdisc cake 8019: root refcnt 2 bandwidth unlimited diffserv3 triple-isolate rtt 100.0ms raw overhead 0
tca_stats 2012223276 tca_stats2 2012222608 tca_xstats 0
calling print_tcstats_attr()
print_tcstats_attr()
got stats2
Sent 7992 bytes 28 pkt (dropped 0, overlimits 0 requeues 0)
xstats 2141024476 tca_stats_app 2012222616
backlog 0b 0p requeues 0
got xstats 2012222616 tca_stats 2012223276 tca_stats2 2012222608 tca_xstats 0
calling print_xstats
memory used: 2240b of 15140Kb
capacity estimate: 0bit
min/max network layer size: 66 / 1154
min/max overhead-adjusted size: 66 / 1154
average network hdr offset: 1
Bulk Best Effort Voice
thresh 0bit 0bit 0bit
target 5.0ms 5.0ms 5.0ms
interval 100.0ms 100.0ms 100.0ms
pk_delay 0us 18us 20us
av_delay 0us 0us 1us
sp_delay 0us 0us 1us
backlog 0b 0b 0b
pkts 0 8 20
bytes 0 3376 4616
...
> And thank you for looking into this! :)
Least I can do! I’m afraid I’m still only at the point where we know that “something” is wrong “somewhere” with either the generation or parsing of this netlink message, so I’ll keep exploring…
More information about the Cake
mailing list