xref: /linux/tools/testing/selftests/bpf/progs/test_trace_ext.c (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2019 Facebook
3 #include <linux/bpf.h>
4 #include <stdbool.h>
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_endian.h>
7 #include <bpf/bpf_tracing.h>
8 
9 __u64 ext_called = 0;
10 
11 SEC("freplace/test_pkt_md_access")
12 int test_pkt_md_access_new(struct __sk_buff *skb)
13 {
14 	ext_called = skb->len;
15 	return 0;
16 }
17 
18 char _license[] SEC("license") = "GPL";
19