]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nfp: bpf: complete ALU32 logic shift supports
authorJiong Wang <jiong.wang@netronome.com>
Fri, 1 Feb 2019 22:39:29 +0000 (22:39 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 2 Feb 2019 02:03:49 +0000 (18:03 -0800)
commitac7a1717a2cbf74c84126998db4e9864ac1fa99b
tree3376c4e79b5826e69b47a892903527aff75745f2
parentdb0a4b3b6b83a081a9ec309cc8178e5c9b4706a5
nfp: bpf: complete ALU32 logic shift supports

The following ALU32 logic shift supports are missing:

  BPF_ALU | BPF_LSH | BPF_X
  BPF_ALU | BPF_RSH | BPF_X
  BPF_ALU | BPF_RSH | BPF_K

For BPF_RSH | BPF_K, it could be implemented using NFP direct shift
instruction. For the other BPF_X shifts, NFP indirect shifts sequences need
to be used.

Separate code-gen hook is assigned to each instruction to make the
implementation clear.

Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
drivers/net/ethernet/netronome/nfp/bpf/jit.c