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>
This commit is contained in:
parent
b88c06e36d
commit
cffc642d93
|
@ -207,6 +207,16 @@ struct bpf_prog_aux;
|
||||||
.off = OFF, \
|
.off = OFF, \
|
||||||
.imm = 0 })
|
.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 */
|
/* Memory store, *(uint *) (dst_reg + off16) = imm32 */
|
||||||
|
|
||||||
#define BPF_ST_MEM(SIZE, DST, OFF, IMM) \
|
#define BPF_ST_MEM(SIZE, DST, OFF, IMM) \
|
||||||
|
|
2192
lib/test_bpf.c
2192
lib/test_bpf.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue