File Index
Files and directories
Sign in
FILE

test_pinning_htab.c

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/bpf/progs/test_pinning_htab.c C
 1// SPDX-License-Identifier: GPL-2.0
 2
 3#include "vmlinux.h"
 4#include <bpf/bpf_helpers.h>
 5
 6char _license[] SEC("license") = "GPL";
 7
 8struct timer_val {
 9	struct bpf_timer timer;
10};
11
12struct {
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
19struct {
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");
~/ Read-only file preview.