summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2020-07-14 15:56:37 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-16 17:00:32 +0200
commit644bfe51fa49c22244d24e896cd3fe3ee2f2cfd1 (patch)
tree70ade60a61ea7f007193c1b908817cae13c43638 /tools/include
parenta4e76f1bda8e7b358dc21f0f925b8a2c4c98e733 (diff)
downloadlinux-stable-644bfe51fa49c22244d24e896cd3fe3ee2f2cfd1.tar.gz
linux-stable-644bfe51fa49c22244d24e896cd3fe3ee2f2cfd1.tar.bz2
linux-stable-644bfe51fa49c22244d24e896cd3fe3ee2f2cfd1.zip
cpumap: Formalize map value as a named struct
As it has been already done for devmap, introduce 'struct bpf_cpumap_val' to formalize the expected values that can be passed in for a CPUMAP. Update cpumap code to use the struct. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Link: https://lore.kernel.org/bpf/754f950674665dae6139c061d28c1d982aaf4170.1594734381.git.lorenzo@kernel.org
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/bpf.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 5e386389913a..109623527358 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -3849,6 +3849,15 @@ struct bpf_devmap_val {
} bpf_prog;
};
+/* CPUMAP 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_cpumap_val {
+ __u32 qsize; /* queue size to remote target CPU */
+};
+
enum sk_action {
SK_DROP = 0,
SK_PASS,