libbpf: Support XDP_SHARED_UMEM with external XDP program
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 7 Nov 2019 17:47:36 +0000 (18:47 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 11 Nov 2019 03:30:45 +0000 (19:30 -0800)
commitcbf07409d0c2afad7bb54be039490bffad8bc737
tree133661eb096da2d2853d5900f0aacb9850879ad4
parent472aeb386eda3b73bbd38a2ec8c928708f77d7ee
libbpf: Support XDP_SHARED_UMEM with external XDP program

Add support in libbpf to create multiple sockets that share a single
umem. Note that an external XDP program need to be supplied that
routes the incoming traffic to the desired sockets. So you need to
supply the libbpf_flag XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD and load
your own XDP program.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: William Tu <u9012063@gmail.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Link: https://lore.kernel.org/bpf/1573148860-30254-2-git-send-email-magnus.karlsson@intel.com
tools/lib/bpf/xsk.c