libbpf: Remove getsockopt() check for XDP_OPTIONS
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 16 Sep 2019 12:33:42 +0000 (14:33 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 19 Sep 2019 12:22:18 +0000 (14:22 +0200)
commite0973a421c6e9d268db2157bcb8756e7ab4b4313
treee27cd424784bb69db15a97bb4a9cbcb692563a1e
parent280ceaed79f18db930c0cc8bb21f6493490bf29c
libbpf: Remove getsockopt() check for XDP_OPTIONS

The xsk_socket__create() function fails and returns an error if it cannot
get the XDP_OPTIONS through getsockopt(). However, support for XDP_OPTIONS
was not added until kernel 5.3, so this means that creating XSK sockets
always fails on older kernels.

Since the option is just used to set the zero-copy flag in the xsk struct,
and that flag is not really used for anything yet, just remove the
getsockopt() call until a proper use for it is introduced.

Suggested-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/xsk.c