summaryrefslogtreecommitdiff
path: root/samples/bpf/xdp_adjust_tail_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/xdp_adjust_tail_kern.c')
-rw-r--r--samples/bpf/xdp_adjust_tail_kern.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/samples/bpf/xdp_adjust_tail_kern.c b/samples/bpf/xdp_adjust_tail_kern.c
index 411fdb21f8bc..cd9ff2a40a39 100644
--- a/samples/bpf/xdp_adjust_tail_kern.c
+++ b/samples/bpf/xdp_adjust_tail_kern.c
@@ -25,12 +25,12 @@
#define ICMP_TOOBIG_SIZE 98
#define ICMP_TOOBIG_PAYLOAD_SIZE 92
-struct bpf_map_def SEC("maps") icmpcnt = {
- .type = BPF_MAP_TYPE_ARRAY,
- .key_size = sizeof(__u32),
- .value_size = sizeof(__u64),
- .max_entries = 1,
-};
+struct {
+ __uint(type, BPF_MAP_TYPE_ARRAY);
+ __type(key, __u32);
+ __type(value, __u64);
+ __uint(max_entries, 1);
+} icmpcnt SEC(".maps");
static __always_inline void count_icmp(void)
{