On 12/06/2024 18.44, Sebastian Andrzej Siewior wrote:
The per-CPU flush lists, which are accessed from within the NAPI callback (xdp_do_flush() for instance), are per-CPU. There are subject to the same problem as struct bpf_redirect_info. Add the per-CPU lists cpu_map_flush_list, dev_map_flush_list and xskmap_map_flush_list to struct bpf_net_context. Add wrappers for the access. The lists initialized on first usage (similar to bpf_net_ctx_get_ri()).
[...]
Reviewed-by: Toke Høiland-Jørgensen<toke@xxxxxxxxxx> Signed-off-by: Sebastian Andrzej Siewior<bigeasy@xxxxxxxxxxxxx> --- include/linux/filter.h | 42 ++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/cpumap.c | 19 +++---------------- kernel/bpf/devmap.c | 11 +++-------- net/xdp/xsk.c | 12 ++++-------- 4 files changed, 52 insertions(+), 32 deletions(-)
Acked-by: Jesper Dangaard Brouer <hawk@xxxxxxxxxx>