nfp: bpf: add support for bpf_get_prandom_u32()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 29 Mar 2018 00:48:37 +0000 (17:48 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 29 Mar 2018 02:36:14 +0000 (19:36 -0700)
commitdf4a37d8b53f9fb9af722b056da5edbd9a531768
tree6935e2eadf67ddc371139569dce030b7dabe4cd1
parent41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0
nfp: bpf: add support for bpf_get_prandom_u32()

NFP has a prng register, which we can read to obtain a u32 worth
of pseudo random data.  Generate code for it.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
drivers/net/ethernet/netronome/nfp/bpf/fw.h
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/bpf/verifier.c
drivers/net/ethernet/netronome/nfp/nfp_asm.h