Skip to content

Commit

Permalink
nfp: bpf: don't do ld/mask combination if mask is jump destination
Browse files Browse the repository at this point in the history
If the mask insn in the ld/mask pair is jump destination, then don't do
combination.

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>
  • Loading branch information
Jiong Wang authored and Daniel Borkmann committed Dec 1, 2017
1 parent a09d5c5 commit 1266f5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/netronome/nfp/bpf/jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,9 @@ static void nfp_bpf_opt_ld_mask(struct nfp_prog *nfp_prog)
if (next.src_reg || next.dst_reg)
continue;

if (meta2->flags & FLAG_INSN_IS_JUMP_DST)
continue;

meta2->skip = true;
}
}
Expand Down

0 comments on commit 1266f5d

Please sign in to comment.