Thread (17 messages) flat view 17 messages, 7 authors, 2021-02-27

Re: [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation

From: Björn Töpel <hidden>
Date: 2021-02-26 11:41:41
Also in: bpf

On 2021-02-26 12:37, Toke Høiland-Jørgensen wrote:
Björn Töpel [off-list ref] writes:
quoted
From: Björn Töpel <redacted>

Currently the bpf_redirect_map() implementation dispatches to the
correct map-lookup function via a switch-statement. To avoid the
dispatching, this change adds bpf_redirect_map() as a map
operation. Each map provides its bpf_redirect_map() version, and
correct function is automatically selected by the BPF verifier.

A nice side-effect of the code movement is that the map lookup
functions are now local to the map implementation files, which removes
one additional function call.

Signed-off-by: Björn Töpel <redacted>
Nice! I agree that this is a much nicer approach! :)

(That last paragraph above is why I asked if you updated the performance
numbers in the cover letter; removing an additional function call should
affect those, right?)
Yeah, it should. Let me spend some more time benchmarking on the DEVMAP
scenario.

@Jesper Do you have a CPUMAP benchmark that you can point me to? I just
did functional testing for CPUMAP
Acked-by: Toke Høiland-Jørgensen <redacted>
Thank you!


Björn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help