diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-03-28 17:48:36 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-03-28 19:36:14 -0700 |
commit | 41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0 (patch) | |
tree | 7ba8625d79f116af1aca358f991d9b7fb1fcdfb4 /drivers/net/ethernet/netronome/nfp/nfp_asm.h | |
parent | b556ddd9c19983f3f13ab0d524f884349fead115 (diff) | |
download | blackbird-obmc-linux-41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0.tar.gz blackbird-obmc-linux-41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0.zip |
nfp: bpf: add support for atomic add of unknown values
Allow atomic add to be used even when the value is not guaranteed
to fit into a 16 bit immediate. This requires the value to be pulled
as data, and therefore use of a transfer register and a context swap.
Track the information about possible lengths of the value, if it's
guaranteed to be larger than 16bits don't generate the code for the
optimized case at all.
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h index 185192590a17..36524dd6021b 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, CMD_TGT_ADD_IMM, __CMD_TGT_MAP_SIZE, }; @@ -252,6 +253,8 @@ enum cmd_mode { enum cmd_ctx_swap { CMD_CTX_SWAP = 0, + CMD_CTX_SWAP_DEFER1 = 1, + CMD_CTX_SWAP_DEFER2 = 2, CMD_CTX_NO_SWAP = 3, }; |