Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Jonathan Morton <chromatix99@gmail.com>,
	Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] codel in ebpf?
Date: Thu, 2 Aug 2018 17:22:43 -0700	[thread overview]
Message-ID: <CAA93jw7s5i=0f7TQPZiu68jwmRZDSGmjSqkcbQ569ai1umh2aA@mail.gmail.com> (raw)
In-Reply-To: <87ftzwy1pw.fsf@toke.dk>

On Thu, Aug 2, 2018 at 1:04 PM Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>
> Dave Taht <dave.taht@gmail.com> writes:
>
> > On Wed, Aug 1, 2018 at 10:25 AM Dave Taht <dave.taht@gmail.com> wrote:
> >>
> >> I wonder if ebpf has opcode space for an invsqrt?
> >
> > bpf_ktime_get_ns() exists...
> >
> > one thing that I don't know if bpf can do is read/write the
> > skb->tstamp field. The plan would be to rigorously write it (if not
> > supplied by hw) on all ingress ports and check it on all egress ports.
>
> An XDP eBPF program (run at earliest possible ingress) has access to a
> buffer of arbitrary data that is attached to the skb and that can be
> read from later eBPF programs. So it doesn't need to muck with
> skb->tstamp for this.

It does? All I see is maps. If you clone or otherwise split the
packet, what happens?

> > That said, every time I've tried to do something in ebpf I hit a
> > limitation I'd not thunk of yet.
>
> Yeah, the whole XDP/eBPF system is somewhat of a work in progress ;)
>
> > For example, where can you attach the egress filter?
> >
> > My thought would be to use a bfifo > bpf -> bql, but from what little
> > I understand, it's bpf -> bfifo -> bql
>
> Yeah, it is. Don't think there's a way to run an eBPF program after the
> qdisc...

Well, it seems possible to move this typical part of an ebpf specific qdisc
from ingress to egress. Gawd knows what that would break, but, essentially....

      filter = rcu_dereference_bh(q->filter_list);

retry: skb = dequeue();

     ...
      if(filter) {
         *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
        result = tcf_classify(skb, filter, &res, false);
        switch (result) {
              case TC_ACT_SHOT: clean up stuff; goto retry;
        }
...


> -Toke



-- 

Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619

  reply	other threads:[~2018-08-03  0:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 16:22 [Cake] passing args to bpf programs Dave Taht
2018-08-01 16:35 ` Stephen Hemminger
2018-08-01 16:36 ` Dave Taht
2018-08-01 16:42   ` Jonathan Morton
2018-08-01 16:54     ` Dave Taht
2018-08-01 17:25       ` Dave Taht
2018-08-01 19:20         ` [Cake] codel in ebpf? Dave Taht
2018-08-02 20:04           ` Toke Høiland-Jørgensen
2018-08-03  0:22             ` Dave Taht [this message]
2018-08-03 10:19               ` Toke Høiland-Jørgensen

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='CAA93jw7s5i=0f7TQPZiu68jwmRZDSGmjSqkcbQ569ai1umh2aA@mail.gmail.com' \
    --to=dave.taht@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    --cc=toke@toke.dk \
    /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