Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Jonathan Morton <chromatix99@gmail.com>, Pete Heist <pete@heistp.net>
Cc: Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] issue with Cake and bpf filter
Date: Sun, 12 Aug 2018 21:42:47 +0200	[thread overview]
Message-ID: <87h8jze5hk.fsf@toke.dk> (raw)
In-Reply-To: <ADBDA860-5F3D-43EA-9182-E30A5C05D2EC@gmail.com>

Jonathan Morton <chromatix99@gmail.com> writes:

>> On 12 Aug, 2018, at 1:23 pm, Pete Heist <pete@heistp.net> wrote:
>> 
>> One more thing to add to this, when working with another bpf filter which is relatively similar to this simple one (although has some more innocuous looking code like map lookups and read-only operations on the skb) sometimes the attached is suddenly and repeatedly sent to both syslog and kern.log until the disk fills up...
>
>> Aug 12 09:57:25 ubuntu kernel: [ 2408.152975] WARNING: CPU: 3 PID: 2304 at /home/a/src/sch_cake/sch_cake.c:2094 cake_dequeue+0x791/0xc70 [sch_cake]
>
>> 	WARN_ON(host_load > CAKE_QUEUES);
>
> Yeah, something is going seriously wrong here. It shouldn't be
> possible for that warning to trigger; if it is, then Cake's internal
> data structures are being corrupted somehow.
>
> But Cake doesn't directly read tc_classid from an skb. So what could
> it be influencing?

Yes it does; setting tc_classid is one way to set the flow class that is
read by the call to tcf_classify(). I guess the problem is that
cake_hash() is bypassed, so the *host_refcnt variables are not
incremented.

There's been another report of the same issue on github; haven't had
time to look into it yet, but I guess this is the reason...

I guess there are two options here; either always run the hashing
algorithm to select the host hashes, or make sure the srchost/dsthost
fields are set to 0 when tc classification is used. I think the latter
is the better approach; but I'm not sure if it's enough to just set the
fields to 0? There seem to be unconditional decrements of the refcnts in
multiple places?

-Toke

  reply	other threads:[~2018-08-12 19:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-12  8:17 Pete Heist
2018-08-12 10:23 ` Pete Heist
2018-08-12 13:41   ` Jonathan Morton
2018-08-12 19:42     ` Toke Høiland-Jørgensen [this message]
2018-08-12 21:34       ` Jonathan Morton
2018-08-13  0:21         ` Jonathan Morton
2018-08-13  5:44           ` Jonathan Morton
2018-08-13 11:01           ` Toke Høiland-Jørgensen
2018-08-21 11:25             ` Toke Høiland-Jørgensen
2018-08-21 21:06               ` Pete Heist
2018-08-21 21:17                 ` Toke Høiland-Jørgensen
2018-08-21 21:46                   ` Pete Heist
2018-08-22  9:49                     ` Toke Høiland-Jørgensen
2018-08-22  9:41                   ` Toke Høiland-Jørgensen
2018-08-22  6:17                 ` Jonathan Morton
2018-08-22  9:30                   ` Pete Heist
2018-08-22  9:37                     ` Toke Høiland-Jørgensen
2018-08-22  9:51                       ` Pete Heist
2018-08-22 10:00                         ` Jonathan Morton
2018-08-22 10:13                           ` Toke Høiland-Jørgensen
2018-08-22 10:32                             ` Pete Heist

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=87h8jze5hk.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=cake@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    --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