bpf: Allow bpf_map_lookup_elem() on an xskmap
authorJonathan Lemon <jonathan.lemon@gmail.com>
Thu, 6 Jun 2019 20:59:40 +0000 (13:59 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 11 Jun 2019 06:31:26 +0000 (23:31 -0700)
commitfada7fdc83c0bf8755956bff707c42b609223301
tree905e559b4c1aa750e8a08b2c357e8a358d35e9fb
parent4ecabd55c90469629460f035f4bf4c8ae3d2743b
bpf: Allow bpf_map_lookup_elem() on an xskmap

Currently, the AF_XDP code uses a separate map in order to
determine if an xsk is bound to a queue.  Instead of doing this,
have bpf_map_lookup_elem() return a xdp_sock.

Rearrange some xdp_sock members to eliminate structure holes.

Remove selftest - will be added back in later patch.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
include/net/xdp_sock.h
include/uapi/linux/bpf.h
kernel/bpf/verifier.c
kernel/bpf/xskmap.c
net/core/filter.c
tools/testing/selftests/bpf/verifier/prevent_map_lookup.c