|
|
Log in / Subscribe / Register

introduce support for XDP programs in CPUMAP

From:  Lorenzo Bianconi <lorenzo-AT-kernel.org>
To:  bpf-AT-vger.kernel.org, netdev-AT-vger.kernel.org
Subject:  [PATCH bpf-next 0/6] introduce support for XDP programs in CPUMAP
Date:  Sun, 31 May 2020 23:46:45 +0200
Message-ID:  <cover.1590960613.git.lorenzo@kernel.org>
Cc:  davem-AT-davemloft.net, ast-AT-kernel.org, brouer-AT-redhat.com, toke-AT-redhat.com, daniel-AT-iogearbox.net, lorenzo.bianconi-AT-redhat.com, dsahern-AT-kernel.org
Archive-link:  Article

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.1...
- https://patchwork.ozlabs.org/project/netdev/cover/2020052...

[1] https://patchwork.ozlabs.org/project/netdev/cover/2020052...
[2] https://patchwork.ozlabs.org/project/netdev/patch/2020051...

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

-- 
2.26.2



Copyright © 2020, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds