]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: optimize codegen for JSET with a constant
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 20 Dec 2018 06:13:08 +0000 (22:13 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 20 Dec 2018 16:28:29 +0000 (17:28 +0100)
commitd74a376be14b2a8af1a1532318abe29e28225797
treec6bf58bba8b67edb2e6d80671348a54890966eef
parentf57feb5df4bf0473c80264c01b05cc1a37dc5751
nfp: bpf: optimize codegen for JSET with a constant

The top word of the constant can only have bits set if sign
extension set it to all-1, therefore we don't really have to
mask the top half of the register.  We can just OR it into
the result as is.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c