mbox series

[bpf-next,0/6] introduce support for XDP programs in CPUMAP

Message ID cover.1590960613.git.lorenzo@kernel.org
Headers show
Series introduce support for XDP programs in CPUMAP | expand

Message

Lorenzo Bianconi May 31, 2020, 9:46 p.m. UTC
Similar to what David Ahern proposed in [1] for DEVMAPs, introduce the
capability to attach and run a XDP program to CPUMAP entries.
The idea behind this feature is to add the possibility to define on which CPU
run the eBPF program if the underlying hw does not support RSS.
I respin patch 1/6 from a previous series sent by David [2]
This series is based on the following series:
- https://patchwork.ozlabs.org/project/netdev/cover/cover.1590698295.git.lorenzo@kernel.org/
- https://patchwork.ozlabs.org/project/netdev/cover/20200529220716.75383-1-dsahern@kernel.org/

[1] https://patchwork.ozlabs.org/project/netdev/cover/20200529220716.75383-1-dsahern@kernel.org/
[2] https://patchwork.ozlabs.org/project/netdev/patch/20200513014607.40418-2-dsahern@kernel.org/

David Ahern (1):
  net: Refactor xdp_convert_buff_to_frame

Lorenzo Bianconi (5):
  samples/bpf: xdp_redirect_cpu_user: do not update bpf maps in option
    loop
  cpumap: formalize map value as a named struct
  bpf: cpumap: add the possibility to attach a eBPF program to cpumap
  bpf: cpumap: implement XDP_REDIRECT for eBPF programs attached to map
    entries
  samples/bpf: xdp_redirect_cpu: load a eBPF program on cpumap

 include/linux/bpf.h                 |   6 ++
 include/net/xdp.h                   |  35 ++++---
 include/trace/events/xdp.h          |  18 +++-
 include/uapi/linux/bpf.h            |   1 +
 kernel/bpf/cpumap.c                 | 147 +++++++++++++++++++++++-----
 net/core/dev.c                      |   8 ++
 net/core/filter.c                   |   7 ++
 samples/bpf/xdp_redirect_cpu_kern.c |  34 +++++--
 samples/bpf/xdp_redirect_cpu_user.c | 140 ++++++++++++++++++++++----
 tools/include/uapi/linux/bpf.h      |   1 +
 10 files changed, 329 insertions(+), 68 deletions(-)