]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
nfp: bpf: add stack write support
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 23 Oct 2017 18:58:08 +0000 (11:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Oct 2017 08:38:37 +0000 (17:38 +0900)
commitee9133a845fe8ad15f989e29bf8e2c8abe7986b8
tree29ac3ba321bf9bb5cccb95ad4fbe55e8eddd6cce
parent70c78fc138b6d0ef76d9920034e25082dd3a36ac
nfp: bpf: add stack write support

Stack is implemented by the LMEM register file.  Unaligned accesses
to LMEM are not allowed.  Accesses also have to be 4B wide.

To support stack we need to make sure offsets of pointers are known
at translation time (for now) and perform correct load/mask/shift
operations.

Since we can access first 64B of LMEM without much effort support
only stacks not bigger than 64B.  Following commits will extend
the possible sizes beyond that.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/bpf/offload.c
drivers/net/ethernet/netronome/nfp/bpf/verifier.c