summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_btf_ext.c
blob: cdf20331db0451895b034eb06a7e90c2a9ebda93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2025 Meta Platforms Inc. */

#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include "bpf_misc.h"

char _license[] SEC("license") = "GPL";

__noinline static void f0(void)
{
	__u64 a = 1;

	__sink(a);
}

SEC("xdp")
__u64 global_func(struct xdp_md *xdp)
{
	f0();
	return XDP_DROP;
}