summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorJonathan Lemon2019-06-06 22:59:40 +0200
committerAlexei Starovoitov2019-06-11 08:31:26 +0200
commitfada7fdc83c0bf8755956bff707c42b609223301 (patch)
tree905e559b4c1aa750e8a08b2c357e8a358d35e9fb /include/uapi/linux/bpf.h
parentbpf: allow CGROUP_SKB programs to use bpf_skb_cgroup_id() helper (diff)
downloadkernel-qcow2-linux-fada7fdc83c0bf8755956bff707c42b609223301.tar.gz
kernel-qcow2-linux-fada7fdc83c0bf8755956bff707c42b609223301.tar.xz
kernel-qcow2-linux-fada7fdc83c0bf8755956bff707c42b609223301.zip
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>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 7c6aef253173..ae0907d8c03a 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -3083,6 +3083,10 @@ struct bpf_sock_tuple {
};
};
+struct bpf_xdp_sock {
+ __u32 queue_id;
+};
+
#define XDP_PACKET_HEADROOM 256
/* User return codes for XDP prog type.