• Jiong Wang's avatar
    nfp: bpf: flag jump destination to guide insn combine optimizations · a09d5c52
    Jiong Wang authored
    NFP eBPF offload JIT engine is doing some instruction combine based
    optimizations which however must not be safe if the combined sequences
    are across basic block boarders.
    
    Currently, there are post checks during fixing jump destinations. If the
    jump destination is found to be eBPF insn that has been combined into
    another one, then JIT engine will raise error and abort.
    
    This is not optimal. The JIT engine ought to disable the optimization on
    such cross-bb-border sequences instead of abort.
    
    As there is no control flow information in eBPF infrastructure that we
    can't do basic block based optimizations, this patch extends the existing
    jump destination record pass to also flag the jump destination, then in
    instruction combine passes we could skip the optimizations if insns in the
    sequence are jump targets.
    Suggested-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
    Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    a09d5c52
offload.c 6.8 KB