Skip to content

RFC bpf: Add support for XDP programs in DEVMAPs

David Ahern netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4bpf: Handle 8-byte values in DEVMAP and DEVMAP_HASHkernel/bpf/devmap.c+40 -133 replies
2/4bpf: Add support to attach bpf program to a devmapinclude/linux/bpf.h include/uapi/linux/bpf.h kernel/bpf/devmap.c +2 more+102 -52 replies
3/4xdp: Add xdp_txq_info to xdp_buffinclude/net/xdp.h include/uapi/linux/bpf.h kernel/bpf/devmap.c +2 more+29 -02 replies
4/4bpftool: Add SEC name for xdp programs attached to device maptools/lib/bpf/libbpf.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC bpf-next 0/4] bpf: Add support for XDP programs in DEVMAPs

Implementation of Daniel's proposal for allowing DEVMAP entries to be a device index, program id pair. Daniel suggested an fd to specify the program, but that seems odd to me that you insert the value as an fd, but read it back as an id since the fd can be closed.

David Ahern (4):
bpf: Handle 8-byte values in DEVMAP and DEVMAP_HASH
bpf: Add support to attach bpf program to a devmap
xdp: Add xdp_txq_info to xdp_buff
bpftool: Add SEC name for xdp programs attached to device map

 include/linux/bpf.h            |   5 ++
 include/net/xdp.h              |   5 ++
 include/uapi/linux/bpf.h       |   3 +
 kernel/bpf/devmap.c            | 132 +++++++++++++++++++++++++++++----
 net/core/dev.c                 |  18 +++++
 net/core/filter.c              |  17 +++++
 tools/include/uapi/linux/bpf.h |   3 +
 tools/lib/bpf/libbpf.c         |   2 +
 8 files changed, 170 insertions(+), 15 deletions(-)
Signature · 1 line
2.21.1 (Apple Git-122.3)