diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2015-05-11 22:22:44 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-12 23:15:25 -0400 |
commit | cffc642d93f9324a06dfbd7da9af29652952a248 (patch) | |
tree | aff9454a155b39880d89e327ef40114cff9a776c /include | |
parent | b88c06e36dcb9b4ae285f7821f62d68dc34b25d3 (diff) | |
download | lwn-cffc642d93f9324a06dfbd7da9af29652952a248.tar.gz lwn-cffc642d93f9324a06dfbd7da9af29652952a248.zip |
test_bpf: add 173 new testcases for eBPF
add an exhaustive set of eBPF tests bringing total to:
test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/filter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 3c03a6085b82..ce1d72d34382 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -207,6 +207,16 @@ struct bpf_prog_aux; .off = OFF, \ .imm = 0 }) +/* Atomic memory add, *(uint *)(dst_reg + off16) += src_reg */ + +#define BPF_STX_XADD(SIZE, DST, SRC, OFF) \ + ((struct bpf_insn) { \ + .code = BPF_STX | BPF_SIZE(SIZE) | BPF_XADD, \ + .dst_reg = DST, \ + .src_reg = SRC, \ + .off = OFF, \ + .imm = 0 }) + /* Memory store, *(uint *) (dst_reg + off16) = imm32 */ #define BPF_ST_MEM(SIZE, DST, OFF, IMM) \ |