FILE
prepare.c
File preview with syntax highlighting.
linux-6.19.14/tools/testing/selftests/bpf/progs/prepare.c
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2025 Meta */ 3#include <vmlinux.h> 4#include <bpf/bpf_helpers.h> 5 6char _license[] SEC("license") = "GPL"; 7 8int err; 9 10struct { 11 __uint(type, BPF_MAP_TYPE_RINGBUF); 12 __uint(max_entries, 4096); 13} ringbuf SEC(".maps"); 14 15struct { 16 __uint(type, BPF_MAP_TYPE_ARRAY); 17 __uint(max_entries, 1); 18 __type(key, __u32); 19 __type(value, __u32); 20} array_map SEC(".maps"); 21 22SEC("cgroup_skb/egress") 23int program(struct __sk_buff *skb) 24{ 25 err = 0; 26 return 0; 27}
~/
Read-only file preview.