summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdp1_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/xdp1_kern.c')
-rw-r--r--samples/bpf/xdp1_kern.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/samples/bpf/xdp1_kern.c b/samples/bpf/xdp1_kern.c
index 219742106bfd..db6870aee42c 100644
--- a/samples/bpf/xdp1_kern.c
+++ b/samples/bpf/xdp1_kern.c
@@ -14,12 +14,12 @@
#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)
{