History

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.

Lorenzo Bianconi committed 6 years ago

Commit 644bfe51 parent a4e76f13 files · +33 −13Browse files

Showing the changes to tools/include/uapi/linux (1 of 3 files). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+9−0
@@ -3849,6 +3849,15 @@ struct bpf_devmap_val { · 3848 unmodified lines
38493849 } bpf_prog;
38503850 };
38513851
3852+/* CPUMAP map-value layout
3853+ *
3854+ * The struct data-layout of map-value is a configuration interface.
3855+ * New members can only be added to the end of this structure.
3856+ */
3857+struct bpf_cpumap_val {
3858+ __u32 qsize; /* queue size to remote target CPU */
3859+};
3860+
38523861 enum sk_action {
38533862 SK_DROP = 0,
38543863 SK_PASS,