linux-stable/tools
Ciara Loftus ca7a83e248 libbpf: Only create rx and tx XDP rings when necessary
Prior to this commit xsk_socket__create(_shared) always attempted to create
the rx and tx rings for the socket. However this causes an issue when the
socket being setup is that which shares the fd with the UMEM. If a
previous call to this function failed with this socket after the rings were
set up, a subsequent call would always fail because the rings are not torn
down after the first call and when we try to set them up again we encounter
an error because they already exist. Solve this by remembering whether the
rings were set up by introducing new bools to struct xsk_umem which
represent the ring setup status and using them to determine whether or
not to set up the rings.

Fixes: 1cad078842 ("libbpf: add support for using AF_XDP sockets")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210331061218.1647-4-ciara.loftus@intel.com
2021-04-01 14:45:43 -07:00
..
accounting
arch tools headers UAPI: Sync KVM's kvm.h and vmx.h headers with the kernel sources 2021-03-06 16:54:30 -03:00
bootconfig tools/bootconfig: Add tracing_on support to helper scripts 2021-01-14 10:32:20 -05:00
bpf Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2021-02-26 13:16:31 -08:00
build perf build: Move feature cleanup under tools/build 2021-03-06 16:54:24 -03:00
cgroup
debugging docs: Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means 2020-12-08 10:53:58 -07:00
edid
firewire
firmware
gpio tools: gpio: remove uAPI v1 code no longer used by selftests 2021-02-15 11:43:28 +01:00
hv
iio
include Merge git://git.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2021-03-09 17:15:56 -08:00
io_uring
kvm/kvm_stat tools/kvm_stat: Exempt time-based counters 2020-12-11 19:18:51 -05:00
laptop
leds
lib libbpf: Only create rx and tx XDP rings when necessary 2021-04-01 14:45:43 -07:00
memory-model tools/memory-model: Fix typo in klitmus7 compatibility table 2021-01-04 14:40:50 -08:00
objtool objtool,x86: Fix uaccess PUSHF/POPF validation 2021-03-12 09:15:49 +01:00
pci
pcmcia
perf perf cs-etm: Fix bitmap for option 2021-03-06 16:54:33 -03:00
power platform-drivers-x86 for v5.12-1 2021-02-22 08:50:01 -08:00
scripts New features: 2021-02-22 13:59:43 -08:00
spi
testing bpf/selftests: Test that kernel rejects a TCP CC with an invalid license 2021-03-26 17:51:02 +01:00
thermal/tmon
time
tracing tracing/tools: fix a couple of spelling mistakes 2021-02-25 12:54:16 -05:00
usb
virtio tools/virtio: add barrier for aarch64 2020-12-18 16:14:30 -05:00
vm
wmi
Makefile tracing/tools: Add the latency-collector to tools directory 2021-02-12 11:52:59 -05:00