1 // SPDX-License-Identifier: GPL-2.0 2 3 #include "vmlinux.h" 4 #include <bpf/bpf_helpers.h> 5 6 char _license[] SEC("license") = "GPL"; 7 8 struct timer_val { 9 struct bpf_timer timer; 10 }; 11 12 struct { 13 __uint(type, BPF_MAP_TYPE_HASH); 14 __type(key, __u32); 15 __type(value, struct timer_val); 16 __uint(max_entries, 1); 17 } timer_prealloc SEC(".maps"); 18 19 struct { 20 __uint(type, BPF_MAP_TYPE_HASH); 21 __type(key, __u32); 22 __type(value, struct timer_val); 23 __uint(max_entries, 1); 24 __uint(map_flags, BPF_F_NO_PREALLOC); 25 } timer_no_prealloc SEC(".maps"); 26