FILE
lpm_trie_map.c
File preview with syntax highlighting.
linux-6.19.14/tools/testing/selftests/bpf/progs/lpm_trie_map.c
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");
~/
Read-only file preview.