summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2016-09-28 23:47:37 +0100
committerDavid S. Miller <davem@davemloft.net>2016-09-30 02:10:15 -0400
commit6cd80b55471515e0102760b59034ded000c35a09 (patch)
treeb9c05ea1d830574a6f1cab1ec30e314c8e81f2cf
parent5038056e6bd45788235e97e3bcfc43f96c52ca84 (diff)
downloadlinux-6cd80b55471515e0102760b59034ded000c35a09.tar.bz2
nfp: bpf: zero extend 4 byte context loads
Set upper 32 bits of destination register to zeros after load from the context structure. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c b/drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c
index 3de819acd68c..f8df5300f49c 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c
@@ -1134,6 +1134,8 @@ static int mem_ldx4(struct nfp_prog *nfp_prog, struct nfp_insn_meta *meta)
else
return -ENOTSUPP;
+ wrp_immed(nfp_prog, reg_both(meta->insn.dst_reg * 2 + 1), 0);
+
return 0;
}