On 10/07/2018 01:56 PM, Quentin Monnet wrote: > This patch series adds support for hardware offload of programs containing > BPF-to-BPF function calls. First, a new callback is added to the kernel > verifier, to collect information after the main part of the verification > has been performed. Then support for BPF-to-BPF calls is incrementally > added to the nfp driver, before offloading programs containing such calls > is eventually allowed by lifting the restriction in the kernel verifier, in > the last patch. Please refer to individual patches for details. > > Many thanks to Jiong and Jakub for their precious help and contribution on > the main patches for the JIT-compiler, and everything related to stack > accesses. > > Quentin Monnet (12): > bpf: add verifier callback to get stack usage info for offloaded progs > nfp: bpf: rename nfp_prog->stack_depth as nfp_prog->stack_frame_depth > nfp: bpf: copy eBPF subprograms information from kernel verifier > nfp: bpf: ignore helper-related checks for BPF calls in nfp verifier > nfp: bpf: account for BPF-to-BPF calls when preparing nfp JIT > nfp: bpf: add main logics for BPF-to-BPF calls support in nfp driver > nfp: bpf: account for additional stack usage when checking stack limit > nfp: bpf: update fixup function for BPF-to-BPF calls support > nfp: bpf: fix return address from register-saving subroutine to callee > nfp: bpf: optimise save/restore for R6~R9 based on register usage > nfp: bpf: support pointers to other stack frames for BPF-to-BPF calls > bpf: allow offload of programs with BPF-to-BPF function calls > > drivers/net/ethernet/netronome/nfp/bpf/jit.c | 381 > ++++++++++++++++++++-- > drivers/net/ethernet/netronome/nfp/bpf/main.h | 52 ++- > drivers/net/ethernet/netronome/nfp/bpf/offload.c | 11 +- > drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 141 +++++++- > drivers/net/ethernet/netronome/nfp/nfp_asm.h | 9 + > drivers/net/netdevsim/bpf.c | 8 +- > include/linux/bpf.h | 1 + > include/linux/bpf_verifier.h | 1 + > kernel/bpf/offload.c | 18 + > kernel/bpf/verifier.c | 13 +- > 10 files changed, 589 insertions(+), 46 deletions(-) >
Applied to bpf-next, thanks Quentin!
