Hi, On Fri, Mar 10, 2023 at 3:03 PM Puranjay Mohan <puranjay12@xxxxxxxxx> wrote: > > Hi, > I am starting this thread to know if someone is implementing the BPF > dispatcher for ARM64 and if not, what would be needed to make this > happen. > > The basic infra + x86 specific code was introduced in [1] by Björn Töpel. > > To make BPF dispatcher work on ARM64, the > arch_prepare_bpf_dispatcher() has to be implemented in > arch/arm64/net/bpf_jit_comp.c. I realized that after [2] the BPF dispatcher is using the bpf_prog_pack allocator. We need to implement bpf_arch_text_copy() and bpf_arch_text_invalidate() to enable the bpf_prog_pack allocator for ARM64. Then we can use it in the JIT as well. [2] https://github.com/kernel-patches/bpf/commit/19c02415da2345d0dda2b5c4495bc17cc14b18b5 > > As I am not well versed with XDP and the JIT, I have a few questions > regarding this. > > 1. What is the best way to test this? Is there a selftest that will > fail now and will pass once the dispatcher is implemented? > 2. As there is no CONFIG_RETPOLINE in ARM64, will the dispatcher be useful. > > [1] https://github.com/torvalds/linux/commit/75ccbef6369e94ecac696a152a998a978d41376b > > -- > Thanks and Regards > > Yours Truly, > > Puranjay Mohan -- Thanks and Regards Yours Truly, Puranjay Mohan