]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - samples/bpf/xdp1_kern.c
Merge tag 'drm-fixes-5.5-2019-12-12' of git://people.freedesktop.org/~agd5f/linux...
[linux.git] / samples / bpf / xdp1_kern.c
index 219742106bfdca272bd8f57463f12b39f5310f78..db6870aee42c0f0b09abca2ece222550d6565d31 100644 (file)
 #include <linux/ipv6.h>
 #include "bpf_helpers.h"
 
-struct bpf_map_def SEC("maps") rxcnt = {
-       .type = BPF_MAP_TYPE_PERCPU_ARRAY,
-       .key_size = sizeof(u32),
-       .value_size = sizeof(long),
-       .max_entries = 256,
-};
+struct {
+       __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
+       __type(key, u32);
+       __type(value, long);
+       __uint(max_entries, 256);
+} rxcnt SEC(".maps");
 
 static int parse_ipv4(void *data, u64 nh_off, void *data_end)
 {