]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: support arithmetic right shift by constant (BPF_ARSH | BPF_K)
authorJiong Wang <jiong.wang@netronome.com>
Fri, 18 May 2018 19:12:10 +0000 (12:12 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 18 May 2018 19:35:55 +0000 (21:35 +0200)
commitace79c58b3d45dde3bc7557dc650824144284fa0
tree8181906f9bec541e5f0bfe8a35edf4e215f272f4
parente940822a425dbc3303bf92a014cf998ba65ccef9
nfp: bpf: support arithmetic right shift by constant (BPF_ARSH | BPF_K)

Code logic is similar with logic right shift except we also need to set
PREV_ALU result properly, the MSB of which is the bit that will be
replicated to fill in all the vacant positions.

Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/nfp_asm.h