Skip to content

Commit

Permalink
net: filter: doc: add section for BPF test suite
Browse files Browse the repository at this point in the history
Mention the recently added test suite in the documentation file.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed May 23, 2014
1 parent b1fcd35 commit 04caa48
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Documentation/networking/filter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,20 @@ loops and other CFG validation; second step starts from the first insn and
descends all possible paths. It simulates execution of every insn and observes
the state change of registers and stack.

Testing
-------

Next to the BPF toolchain, the kernel also ships a test module that contains
various test cases for classic and internal BPF that can be executed against
the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and
enabled via Kconfig:

CONFIG_TEST_BPF=m

After the module has been built and installed, the test suite can be executed
via insmod or modprobe against 'test_bpf' module. Results of the test cases
including timings in nsec can be found in the kernel log (dmesg).

Misc
----

Expand Down

0 comments on commit 04caa48

Please sign in to comment.