nfp: bpf: copy range info for all operands of all ALU operations
authorJiong Wang <jiong.wang@netronome.com>
Fri, 6 Jul 2018 22:13:20 +0000 (15:13 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 6 Jul 2018 23:45:31 +0000 (01:45 +0200)
commit33b94310586b761fd04de0ef951d2f5d764b9b2a
tree4cf9c294fc27778495f10d426502002bf874ef1a
parent662c54721d3a1e8950029cb6b0ed264d59847711
nfp: bpf: copy range info for all operands of all ALU operations

NFP verifier hook is coping range information of the shift amount for
indirect shift operation so optimized shift sequences could be generated.

We want to use range info to do more things. For example, to decide whether
multiplication and divide are supported on the given range.

This patch simply let NFP verifier hook to copy range info for all operands
of all ALU operands.

Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/bpf/offload.c
drivers/net/ethernet/netronome/nfp/bpf/verifier.c