summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-12-20 07:13:07 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-12-20 17:28:28 +0100
commit6e774845b321e729966fed7de4aa8ea59c2c3b2e (patch)
treedf918bf93cefeb6546a328d8ca7012cf81b1723d /drivers/net/ethernet
parentbpf: verifier: reorder stack size check with dead code sanitization (diff)
downloadlinux-6e774845b321e729966fed7de4aa8ea59c2c3b2e.tar.xz
linux-6e774845b321e729966fed7de4aa8ea59c2c3b2e.zip
nfp: bpf: remove the trivial JSET optimization
The verifier will now understand the JSET instruction, so don't mark the dead branch in the JIT as noop. We won't generate any code, anyway. 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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/netronome/nfp/bpf/jit.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/bpf/jit.c b/drivers/net/ethernet/netronome/nfp/bpf/jit.c
index 662cbc21d909..f765e76e4924 100644
--- a/drivers/net/ethernet/netronome/nfp/bpf/jit.c
+++ b/drivers/net/ethernet/netronome/nfp/bpf/jit.c
@@ -3054,11 +3054,6 @@ static int jset_imm(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta)
u64 imm = insn->imm; /* sign extend */
swreg tmp_reg;
- if (!imm) {
- meta->skip = true;
- return 0;
- }
-
if (imm & ~0U) {
tmp_reg = ur_load_imm_any(nfp_prog, imm & ~0U, imm_b(nfp_prog));
emit_alu(nfp_prog, reg_none(),