On 08/08/2018 10:48 PM, Dan Siemon wrote:
On Wed, 2018-08-08 at 21:43 +0200, Daniel Borkmann wrote:Depends on what rates you are targeting, you might want to check BPFIs there a way to hook post qdisc? I looked a bit at XDP, but itThanks. I don't know much about tracepoints but will look into this. IseemsThere's a tracepoint right before netdev_start_xmit() which is called
raw tracepoints to reduce overhead given this would be in hot path.
From f6ef56589374 ("Merge branch 'bpf-raw-tracepoints'") that tested
samples/bpf/test_overhead performance on 1 CPU, it says:
tracepoint base kprobe+bpf tracepoint+bpf raw_tracepoint+bpf
task_rename 1.1M 769K 947K 1.0M
urandom_read 789K 697K 750K 755K
Where would the context extracted from the packet in the BPF prog (egProbably makes sense to flatten part of the key and map it into
skb->mark, or store it into skb->cb, or store an offset there
that points into the packet.
Ideally this context is extracted once the ingress port and flows withI think it might be useful, a sch_clsact subhook would avoid having to
unclone or linearize the skb. There's also an option to place cls_bpf
in direct-action mode into sch_fq_codel which would come after your htb
(see fq_codel_classify()), but I presumed you also want the hook after