Merge tag 'arm-soc-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / samples / bpf / ibumad_kern.c
index 3a91b4c..26dcd4d 100644 (file)
 #include <bpf/bpf_helpers.h>
 
 
-struct bpf_map_def SEC("maps") read_count = {
-       .type        = BPF_MAP_TYPE_ARRAY,
-       .key_size    = sizeof(u32), /* class; u32 required */
-       .value_size  = sizeof(u64), /* count of mads read */
-       .max_entries = 256, /* Room for all Classes */
-};
-
-struct bpf_map_def SEC("maps") write_count = {
-       .type        = BPF_MAP_TYPE_ARRAY,
-       .key_size    = sizeof(u32), /* class; u32 required */
-       .value_size  = sizeof(u64), /* count of mads written */
-       .max_entries = 256, /* Room for all Classes */
-};
+struct {
+       __uint(type, BPF_MAP_TYPE_ARRAY);
+       __type(key, u32); /* class; u32 required */
+       __type(value, u64); /* count of mads read */
+       __uint(max_entries, 256); /* Room for all Classes */
+} read_count SEC(".maps");
+
+struct {
+       __uint(type, BPF_MAP_TYPE_ARRAY);
+       __type(key, u32); /* class; u32 required */
+       __type(value, u64); /* count of mads written */
+       __uint(max_entries, 256); /* Room for all Classes */
+} write_count SEC(".maps");
 
 #undef DEBUG
 #ifndef DEBUG