diff options
author | Jiong Wang <jiong.wang@netronome.com> | 2017-12-01 08:32:52 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-01 22:59:20 +0300 |
commit | 1266f5d6559e30e9afdebfff60d60ab86a8da77b (patch) | |
tree | 44e6a3f3fa4ae97c649c500916b216dfff2aa6b0 /drivers/net/ethernet/netronome/nfp/bpf | |
parent | a09d5c52c42129adbac2d1e39bd0e49a92729e3e (diff) | |
download | linux-1266f5d6559e30e9afdebfff60d60ab86a8da77b.tar.xz |
nfp: bpf: don't do ld/mask combination if mask is jump destination
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/bpf')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/bpf/jit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/bpf/jit.c b/drivers/net/ethernet/netronome/nfp/bpf/jit.c index f76659ecb654..f2317b764222 100644 --- a/drivers/net/ethernet/netronome/nfp/bpf/jit.c +++ b/drivers/net/ethernet/netronome/nfp/bpf/jit.c @@ -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; } } |