summaryrefslogtreecommitdiffstats
path: root/tools/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2020-06-09 15:31:52 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-06-09 11:36:19 -0700
commit042b1545fe47788e734b0f074a8ae65856015cdf (patch)
treece52d0d30b9d923882633c776b073d80bc812cf3 /tools/include/uapi/linux/bpf.h
parent281920b7e0b31e0a7706433ff58e7d52ac97c327 (diff)
downloadlinux-042b1545fe47788e734b0f074a8ae65856015cdf.tar.gz
linux-042b1545fe47788e734b0f074a8ae65856015cdf.tar.xz
bpf: Selftests and tools use struct bpf_devmap_val from uapi
Sync tools uapi bpf.h header file and update selftests that use struct bpf_devmap_val. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/159170951195.2102545.1833108712124273987.stgit@firesoul
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
-rw-r--r--tools/include/uapi/linux/bpf.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index c65b374a5090..19684813faae 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -3761,6 +3761,19 @@ struct xdp_md {
__u32 egress_ifindex; /* txq->dev->ifindex */
};
+/* DEVMAP map-value layout
+ *
+ * The struct data-layout of map-value is a configuration interface.
+ * New members can only be added to the end of this structure.
+ */
+struct bpf_devmap_val {
+ __u32 ifindex; /* device index */
+ union {
+ int fd; /* prog fd on map write */
+ __u32 id; /* prog id on map read */
+ } bpf_prog;
+};
+
enum sk_action {
SK_DROP = 0,
SK_PASS,