]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: fix code-gen bug on BPF_ALU | BPF_XOR | BPF_K
authorJiong Wang <jiong.wang@netronome.com>
Fri, 22 Feb 2019 22:36:03 +0000 (22:36 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 22 Feb 2019 23:07:47 +0000 (00:07 +0100)
commite154e1b11f93cf5ec0ebf57761f49c60a1843def
tree9096cfe0cd70c4f169e74f05a4f93d1a8af6cd20
parent678dff99294ec55f1df6a1a3794dee77d5b1ae83
nfp: bpf: fix code-gen bug on BPF_ALU | BPF_XOR | BPF_K

The intended optimization should be A ^ 0 = A, not A ^ -1 = A.

Fixes: 55ffbdbb0433 ("nfp: add BPF to NFP code translator")
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c