]> granicus.if.org Git - strace/commit
Implement decoding of BPF_PROG_TEST_RUN command of bpf syscall
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Nov 2017 00:29:10 +0000 (00:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Nov 2017 21:39:59 +0000 (21:39 +0000)
commit875115da2d02dcecccee83841263bee3a9f8ccae
treeea63ab1c8a1fd0beac0605a6d0ded2b0e6b73d34
parent2d95b53db422529a6e0dba1662f6375794b8a851
Implement decoding of BPF_PROG_TEST_RUN command of bpf syscall

* configure.ac: Check for union bpf_attr.test.duration.
* bpf.c (decode_BPF_PROG_TEST_RUN): New function.
(SYS_FUNC(bpf)) <bpf_cmd_decoders>: Use it.
* NEWS: Mention this.
* tests/bpf.c: Include "print_fields.h".
Add macro guard for BPF_PROG_TEST_RUN decoder test.
[HAVE_UNION_BPF_ATTR_TEST_DURATION] (sample_BPF_PROG_TEST_RUN_attr):
New variable.
[HAVE_UNION_BPF_ATTR_TEST_DURATION] (init_BPF_PROG_TEST_RUN_first,
print_BPF_PROG_TEST_RUN_first, init_BPF_PROG_TEST_RUN_attr,
print_BPF_PROG_TEST_RUN_attr): New functions.
(main) [HAVE_UNION_BPF_ATTR_TEST_DURATION]: Use them.
NEWS
bpf.c
configure.ac
tests/bpf.c