1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2018 Facebook */
4 #include <bpf/bpf_helpers.h>
5 #include "bpf_legacy.h"
7 int _version
SEC("version") = 1;
14 struct bpf_map_def
SEC("maps") btf_map
= {
15 .type
= BPF_MAP_TYPE_ARRAY
,
16 .key_size
= sizeof(int),
17 .value_size
= sizeof(struct ipv_counts
),
21 BPF_ANNOTATE_KV_PAIR(btf_map
, int, struct ipv_counts
);
23 struct dummy_tracepoint_args
{
24 unsigned long long pad
;
28 __attribute__((noinline
))
29 int test_long_fname_2(struct dummy_tracepoint_args
*arg
)
31 struct ipv_counts
*counts
;
37 counts
= bpf_map_lookup_elem(&btf_map
, &key
);
46 __attribute__((noinline
))
47 int test_long_fname_1(struct dummy_tracepoint_args
*arg
)
49 return test_long_fname_2(arg
);
52 SEC("dummy_tracepoint")
53 int _dummy_tracepoint(struct dummy_tracepoint_args
*arg
)
55 return test_long_fname_1(arg
);
58 char _license
[] SEC("license") = "GPL";