[Cake] codel in ebpf?

Toke Høiland-Jørgensen toke at toke.dk
Thu Aug 2 16:04:27 EDT 2018


Dave Taht <dave.taht at gmail.com> writes:

> On Wed, Aug 1, 2018 at 10:25 AM Dave Taht <dave.taht at 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.

> 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...

-Toke


More information about the Cake mailing list