Merge tag 'for-linus-5.14-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / samples / bpf / test_probe_write_user_kern.c
index fd651a6..220a964 100644 (file)
 #include <bpf/bpf_core_read.h>
 #include "trace_common.h"
 
-struct bpf_map_def SEC("maps") dnat_map = {
-       .type = BPF_MAP_TYPE_HASH,
-       .key_size = sizeof(struct sockaddr_in),
-       .value_size = sizeof(struct sockaddr_in),
-       .max_entries = 256,
-};
+struct {
+       __uint(type, BPF_MAP_TYPE_HASH);
+       __type(key, struct sockaddr_in);
+       __type(value, struct sockaddr_in);
+       __uint(max_entries, 256);
+} dnat_map SEC(".maps");
 
 /* kprobe is NOT a stable ABI
  * kernel functions can be removed, renamed or completely change semantics.