Re: [RFC PATCH v2 bpf-next 00/15] xdp_flow: Flow offload to XDP
From: Toke Høiland-Jørgensen <hidden>
Date: 2019-11-18 10:29:01
Also in:
bpf
From: Toke Høiland-Jørgensen <hidden>
Date: 2019-11-18 10:29:01
Also in:
bpf
Forgot to answer this part...
quoted
It would probably require a bit of refactoring in the kernel data structures so they can be used without being tied to an skb. David Ahern did something similar for the fib. For the routing table case, that resulted in a significant speedup: About 2.5x-3x the performance when using it via XDP (depending on the number of routes in the table).I'm curious about how much the helper function can improve the performance compared to XDP programs which emulates kernel feature without using such helpers. 2.5x-3x sounds a bit slow as XDP to me, but it can be routing specific problem.
That's specific to routing; the numbers we got were roughly consistent with the routing table lookup performance reported here: https://vincent.bernat.ch/en/blog/2017-ipv4-route-lookup-linux I.e., a fib lookup takes something on the order of 30-50 ns, which eats up quite a bit of the time budget for forwarding... -Toke