Thread (45 messages) flat view 45 messages, 10 authors, 2021-01-22

Re: [PATCH bpf-next v2 1/8] xdp: restructure redirect actions

From: Björn Töpel <hidden>
Date: 2021-01-20 17:36:18
Also in: bpf

On 2021-01-20 17:30, Toke Høiland-Jørgensen wrote:
Björn Töpel [off-list ref] writes:
[...]
quoted
It can't be free'd but, ri->map can be cleared via
bpf_clear_redirect_map(). So, between the helper (setting) and the
tracepoint in xdp_do_redirect() it can be cleared (say if the XDP
program is swapped out, prior running xdp_do_redirect()).
But xdp_do_redirect() should be called on driver flush before exiting
the NAPI cycle, so how can the XDP program be swapped out?
To clarify; xdp_do_redirect() is called for each packet in the NAPI poll 
loop.

Yeah, you're right. The xdp_do_redirect() is within the RCU scope, so
the program wont be destroyed (but can be swapped though!).

Hmm, so IOW the bpf_clear_redirect_map() is not needed anymore...


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