Re: [PATCH v7 net-next 15/15] net: Move per-CPU flush-lists to bpf_net_context on PREEMPT_RT.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 18/06/2024 09.13, 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()).

Cc: "Björn Töpel"<bjorn@xxxxxxxxxx>
Cc: Alexei Starovoitov<ast@xxxxxxxxxx>
Cc: Andrii Nakryiko<andrii@xxxxxxxxxx>
Cc: Eduard Zingerman<eddyz87@xxxxxxxxx>
Cc: Hao Luo<haoluo@xxxxxxxxxx>
Cc: Jesper Dangaard Brouer<hawk@xxxxxxxxxx>
Cc: Jiri Olsa<jolsa@xxxxxxxxxx>
Cc: John Fastabend<john.fastabend@xxxxxxxxx>
Cc: Jonathan Lemon<jonathan.lemon@xxxxxxxxx>
Cc: KP Singh<kpsingh@xxxxxxxxxx>
Cc: Maciej Fijalkowski<maciej.fijalkowski@xxxxxxxxx>
Cc: Magnus Karlsson<magnus.karlsson@xxxxxxxxx>
Cc: Martin KaFai Lau<martin.lau@xxxxxxxxx>
Cc: Song Liu<song@xxxxxxxxxx>
Cc: Stanislav Fomichev<sdf@xxxxxxxxxx>
Cc: Toke Høiland-Jørgensen<toke@xxxxxxxxxx>
Cc: Yonghong Song<yonghong.song@xxxxxxxxx>
Cc:bpf@xxxxxxxxxxxxxxx
Reviewed-by: Toke Høiland-Jørgensen<toke@xxxxxxxxxx>
Signed-off-by: Sebastian Andrzej Siewior<bigeasy@xxxxxxxxxxxxx>

Acked-by: Jesper Dangaard Brouer <hawk@xxxxxxxxxx>

---
  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(-)




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux