summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/main.h
diff options
context:
space:
mode:
authorQuentin Monnet <quentin@isovalent.com>2022-10-25 16:03:28 +0100
committerAlexei Starovoitov <ast@kernel.org>2022-10-25 10:11:56 -0700
commitce4f660862359f2172ff4e3df30e641df5475cf6 (patch)
tree77321de34d70c1bed2a82345abbb338b4cd16e4b /tools/bpf/bpftool/main.h
parenteb9d1acf634baf6401dfb4f67dc895290713a357 (diff)
bpftool: Support setting alternative arch for JIT disasm with LLVM
For offloaded BPF programs, instead of failing to create the LLVM disassembler without even looking for a triple at all, do run the function that attempts to retrieve a valid architecture name for the device. It will still fail for the LLVM disassembler, because currently we have no valid triple to return (NFP disassembly is not supported by LLVM). But failing in that function is more logical than to assume in jit_disasm.c that passing an "arch" name is simply not supported. Suggested-by: Song Liu <song@kernel.org> Signed-off-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/r/20221025150329.97371-8-quentin@isovalent.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/main.h')
-rw-r--r--tools/bpf/bpftool/main.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h
index 9a149c67aa5d..467d8472df0c 100644
--- a/tools/bpf/bpftool/main.h
+++ b/tools/bpf/bpftool/main.h
@@ -203,8 +203,7 @@ void print_hex_data_json(uint8_t *data, size_t len);
unsigned int get_page_size(void);
unsigned int get_possible_cpus(void);
const char *
-ifindex_to_bfd_params(__u32 ifindex, __u64 ns_dev, __u64 ns_ino,
- const char **opt);
+ifindex_to_arch(__u32 ifindex, __u64 ns_dev, __u64 ns_ino, const char **opt);
struct btf_dumper {
const struct btf *btf;