diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-03-29 02:48:34 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-03-29 04:36:13 +0200 |
commit | dcb0c27f3c989fecae42593f470a2413434aae28 (patch) | |
tree | 660928c1a3e8585e8f47f06ff577a3fdf166d141 /drivers/net/ethernet/netronome/nfp/nfp_asm.h | |
parent | bpf: add parenthesis around argument of BPF_LDST_BYTES() (diff) | |
download | linux-dcb0c27f3c989fecae42593f470a2413434aae28.tar.xz linux-dcb0c27f3c989fecae42593f470a2413434aae28.zip |
nfp: bpf: add basic support for atomic adds
Implement atomic add operation for 32 and 64 bit values. Depend
on the verifier to ensure alignment. Values have to be kept in
big endian and swapped upon read/write. For now only support
atomic add of a constant.
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_asm.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h index 150d28f9cd52..185192590a17 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_asm.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_asm.h @@ -238,6 +238,7 @@ enum cmd_tgt_map { CMD_TGT_READ32_SWAP, CMD_TGT_READ_LE, CMD_TGT_READ_SWAP_LE, + CMD_TGT_ADD_IMM, __CMD_TGT_MAP_SIZE, }; @@ -254,6 +255,7 @@ enum cmd_ctx_swap { CMD_CTX_NO_SWAP = 3, }; +#define CMD_OVE_DATA GENMASK(5, 3) #define CMD_OVE_LEN BIT(7) #define CMD_OV_LEN GENMASK(12, 8) |