From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
To: Pete Heist <pete@heistp.net>
Cc: Georgios Amanakis <gamanakis@gmail.com>,
"mbo2@uggenabben.se" <mbo2@uggenabben.se>,
Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] Cake on openwrt - falling behind
Date: Sun, 1 Jul 2018 14:38:29 +0000 [thread overview]
Message-ID: <94C9790F-E9BC-4D59-9845-17C305E4B910@darbyshire-bryant.me.uk> (raw)
In-Reply-To: <FBC5AD25-0D4F-42AB-99D1-041F192B6F8E@heistp.net>
[-- Attachment #1: Type: text/plain, Size: 3884 bytes --]
> On 1 Jul 2018, at 14:48, Pete Heist <pete@heistp.net> wrote:
>
> Ok, my reboots were because I need to compile with om-watchdog support, otherwise the OM2P’s hardware watchdog reboots every few minutes. Thus, my sysupgrades were not _actually_ working (watchdog was interrupting them), thus the unknown symbols / dependency problems, etc, so that’s behind me. :/
>
> And yes, I get no tin stats without the patch. With the patch, I get tin stats as expected. This is probably nothing new.
>
> I also compiled on a Raspi 2 (32-bit ARM) running Debian 9.4, and it works as expected without the patch. This probably just confirms what George reported, because I think his wrt1900acs also uses 32-bit ARM.
>
> So yes, MIPS 32-bit, both le and be are both fails. What next? We could test more archs, but it might be more productive to attempt to figure it out in the code when I can at least repro it on MIPS.
>
> You mentioned earlier netlink_parse_nested doesn’t seem to handle 64-bit values but I’m not seeing where that is. I’m getting my head around how stats work so just writing out loud…looks like there are qstats from struct Qdisc then the tin stats which are probably custom for Cake and stored at some address obtained from qdisc_priv, which is right after the regular Qdisc struct. Interesting. I’m searching now for how this data ends up in tc’s hands, which looks like happens in cake_print_xstats with parse_rtattr_nested, then the printing gets underway, and at some point if st[TCA_CAKE_STATS_TIN_STATS] is true it gets into the tin printing business. What’s the condition that fails to make the tin stats not be printed? Best I know is to add debugging statements to figure it out, which I might give a try later today. Am I on the right track?
I think we’ve all been heading in a similar direction that’s for sure. The symptoms are that netlink doesn’t appear to handle 64bit values on MIPS well because generally as soon as you put a 64 bit value in the netlink stream, things go a bit wonky.
I think this is some sort of alignment problem. e.g. If I get cake kmod to insert a dummy 32bit pad netlink attribute at the top of ‘cake_dump’, then I see the tin stats magically appear, although some of the values ‘capacity’ ‘threshold’ ‘sent bytes’ are stupidly high, as if an endian issue has hit.
In openwrt world, mips is not defined as an architecture that can do ‘efficient unaligned access’, thus if you look in include/net/netlink.h you’ll see
static inline bool nla_need_padding_for_64bit(struct sk_buff *skb)
{
#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
/* The nlattr header is 4 bytes in size, that's why we test
* if the skb->data _is_ aligned. A NOP attribute, plus
* nlattr header for next attribute, will make nla_data()
* 8-byte aligned.
*/
if (IS_ALIGNED((unsigned long)skb_tail_pointer(skb), 8))
return true;
#endif
return false;
}
which looks to be designed to align netlink attributes in a friendly way.
I haven’t looked yet to see if working archs define ‘CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS’ and non working archs don’t….but to me it’s an obvious place to start poking, as we clearly have some/most archs wher the iproute/tc & cake code talk well….and one arch where they don’t…. to me that sort of rules out tc/cake doing anything silly.
There’s a ‘kmon-nlmon’ that allows you to create a virtual network interface for the netlink packets and thus capture (tcpdump) and export to wireshark for dissection. I had a look at that a few weeks ago but my head exploded and have only just recovered enough to start looking at this problem again…. the EFFECIENT_UNALIGNED_ACCESS thing is something I discovered about 2 hours ago.
Kevin
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-07-01 14:38 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.381.1530347349.3512.cake@lists.bufferbloat.net>
2018-06-30 16:37 ` Georgios Amanakis
2018-06-30 17:26 ` Pete Heist
2018-06-30 18:09 ` Georgios Amanakis
2018-06-30 18:55 ` Kevin Darbyshire-Bryant
2018-06-30 19:57 ` Pete Heist
2018-06-30 20:58 ` Georgios Amanakis
2018-06-30 21:37 ` Pete Heist
2018-06-30 22:43 ` Pete Heist
2018-06-30 23:20 ` Pete Heist
[not found] ` <CACvFP_gkdAPKSEO7j9+cMPqTa-fJYd8XFEEBD6ZzLuVvaNwsvg@mail.gmail.com>
2018-07-01 2:37 ` [Cake] Fwd: " Georgios Amanakis
2018-07-01 7:18 ` [Cake] " Pete Heist
2018-07-01 13:48 ` Pete Heist
2018-07-01 14:02 ` Dave Taht
2018-07-01 15:30 ` Pete Heist
2018-07-01 14:38 ` Kevin Darbyshire-Bryant [this message]
2018-07-01 16:54 ` Pete Heist
2018-07-01 19:41 ` Kevin Darbyshire-Bryant
2018-07-02 10:19 ` Pete Heist
2018-07-02 11:38 ` Pete Heist
2018-07-02 11:59 ` Kevin Darbyshire-Bryant
2018-07-02 14:01 ` Pete Heist
2018-07-02 12:03 ` Toke Høiland-Jørgensen
2018-07-02 14:51 ` Pete Heist
2018-07-02 16:14 ` Toke Høiland-Jørgensen
2018-07-02 16:59 ` Kevin Darbyshire-Bryant
2018-07-02 17:04 ` Pete Heist
2018-07-02 17:12 ` Kevin Darbyshire-Bryant
2018-07-02 18:24 ` Pete Heist
2018-07-02 19:31 ` Toke Høiland-Jørgensen
2018-07-02 20:09 ` Pete Heist
2018-07-02 20:11 ` Toke Høiland-Jørgensen
2018-07-02 20:46 ` Pete Heist
[not found] ` <mailman.407.1530550780.3512.cake@lists.bufferbloat.net>
2018-07-02 17:50 ` Kevin Darbyshire-Bryant
2018-07-02 19:33 ` Toke Høiland-Jørgensen
2018-07-02 19:36 ` Kevin Darbyshire-Bryant
2018-07-02 19:39 ` Toke Høiland-Jørgensen
2018-07-02 20:03 ` [Cake] cake at 60gbit Dave Taht
2018-07-02 20:09 ` Toke Høiland-Jørgensen
2018-07-02 21:16 ` Pete Heist
2018-07-02 21:35 ` Toke Høiland-Jørgensen
2018-07-02 22:07 ` Georgios Amanakis
2018-07-02 22:12 ` Dave Taht
2018-07-02 23:48 ` Georgios Amanakis
2018-07-02 22:23 ` Toke Høiland-Jørgensen
2018-07-03 7:35 ` Pete Heist
2018-07-03 9:18 ` Jonathan Morton
2018-07-03 9:57 ` Pete Heist
2018-07-03 10:27 ` Toke Høiland-Jørgensen
2018-07-03 10:41 ` Pete Heist
2018-07-05 22:31 ` Toke Høiland-Jørgensen
2018-07-05 23:48 ` Georgios Amanakis
2018-07-06 1:21 ` Dave Taht
2018-07-06 2:55 ` George Amanakis
2018-07-06 3:06 ` George Amanakis
2018-07-06 9:22 ` Toke Høiland-Jørgensen
2018-07-06 9:21 ` Toke Høiland-Jørgensen
2018-07-06 8:55 ` Pete Heist
2018-07-06 9:29 ` Toke Høiland-Jørgensen
2018-07-06 10:00 ` Pete Heist
2018-07-06 10:46 ` Toke Høiland-Jørgensen
2018-07-06 11:33 ` Toke Høiland-Jørgensen
2018-07-06 11:43 ` Jonathan Morton
2018-07-06 11:48 ` Toke Høiland-Jørgensen
2018-07-06 11:58 ` Pete Heist
2018-07-06 12:04 ` Toke Høiland-Jørgensen
2018-07-02 18:39 ` [Cake] Cake on openwrt - falling behind Dave Taht
2018-07-02 19:11 ` Kevin Darbyshire-Bryant
2018-07-02 19:23 ` Toke Høiland-Jørgensen
2018-07-02 19:27 ` Dave Taht
2018-07-02 19:38 ` Toke Høiland-Jørgensen
2018-07-02 20:05 ` Toke Høiland-Jørgensen
2018-07-02 19:31 ` Pete Heist
[not found] ` <mailman.397.1530474091.3512.cake@lists.bufferbloat.net>
2018-07-01 23:55 ` Dave Taht
2018-07-02 0:05 ` Dave Taht
[not found] ` <mailman.392.1530455913.3512.cake@lists.bufferbloat.net>
2018-07-01 15:17 ` Jonathan Morton
[not found] ` <mailman.384.1530384918.3512.cake@lists.bufferbloat.net>
2018-07-01 9:46 ` Magnus Olsson
2018-07-01 12:34 ` Kevin Darbyshire-Bryant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94C9790F-E9BC-4D59-9845-17C305E4B910@darbyshire-bryant.me.uk \
--to=kevin@darbyshire-bryant.me.uk \
--cc=cake@lists.bufferbloat.net \
--cc=gamanakis@gmail.com \
--cc=mbo2@uggenabben.se \
--cc=pete@heistp.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox