Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/bpf.h>
3#include <bpf/bpf_helpers.h>
4#include <bpf/bpf_tracing.h>
5
6#define MAX_ENTRIES 100000000
7
8struct trie_key {
9 __u32 prefixlen;
10 __u32 data;
11};
12
13struct {
14 __uint(type, BPF_MAP_TYPE_LPM_TRIE);
15 __type(key, struct trie_key);
16 __type(value, __u32);
17 __uint(map_flags, BPF_F_NO_PREALLOC);
18 __uint(max_entries, MAX_ENTRIES);
19} trie_free_map SEC(".maps");