diff options
| author | Ingo Molnar <mingo@kernel.org> | 2022-09-21 09:58:02 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2022-09-21 09:58:02 +0200 |
| commit | 74656d03ac36fabb16b9df5221cf398ee3a9ca08 (patch) | |
| tree | 0600e619ac817e2c016c148810814f55280316cc /tools/testing/selftests/bpf/progs/test_btf_haskv.c | |
| parent | 0d97db026509c1a13f732b22670ab1f0ac9d8d87 (diff) | |
| parent | 521a547ced6477c54b4b0cc206000406c221b4d6 (diff) | |
Merge tag 'v6.0-rc6' into locking/core, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_btf_haskv.c')
| -rw-r--r-- | tools/testing/selftests/bpf/progs/test_btf_haskv.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_btf_haskv.c b/tools/testing/selftests/bpf/progs/test_btf_haskv.c deleted file mode 100644 index 07c94df13660..000000000000 --- a/tools/testing/selftests/bpf/progs/test_btf_haskv.c +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (c) 2018 Facebook */ -#include <linux/bpf.h> -#include <bpf/bpf_helpers.h> -#include "bpf_legacy.h" - -struct ipv_counts { - unsigned int v4; - unsigned int v6; -}; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -struct bpf_map_def SEC("maps") btf_map = { - .type = BPF_MAP_TYPE_ARRAY, - .key_size = sizeof(int), - .value_size = sizeof(struct ipv_counts), - .max_entries = 4, -}; -#pragma GCC diagnostic pop - -BPF_ANNOTATE_KV_PAIR(btf_map, int, struct ipv_counts); - -__attribute__((noinline)) -int test_long_fname_2(void) -{ - struct ipv_counts *counts; - int key = 0; - - counts = bpf_map_lookup_elem(&btf_map, &key); - if (!counts) - return 0; - - counts->v6++; - - return 0; -} - -__attribute__((noinline)) -int test_long_fname_1(void) -{ - return test_long_fname_2(); -} - -SEC("dummy_tracepoint") -int _dummy_tracepoint(void *arg) -{ - return test_long_fname_1(); -} - -char _license[] SEC("license") = "GPL"; |
