]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: netfilter: Introduce tests for sets with range concatenation
authorStefano Brivio <sbrivio@redhat.com>
Tue, 21 Jan 2020 23:17:56 +0000 (00:17 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 27 Jan 2020 07:54:30 +0000 (08:54 +0100)
commiteac3879fe91feb51a4d102acbfa0830cebedfafb
tree616072a219c68cd485c26bbb19c4dba9e1a11bef
parent14357d3fdd6c603217156ae1b0220596c3f344ac
selftests: netfilter: Introduce tests for sets with range concatenation

This test covers functionality and stability of the newly added
nftables set implementation supporting concatenation of ranged
fields.

For some selected set expression types, test:
- correctness, by checking that packets match or don't
- concurrency, by attempting races between insertion, deletion, lookup
- timeout feature, checking that packets don't match expired entries

and (roughly) estimate matching rates, comparing to baselines for
simple drop on netdev ingress hook and for hash and rbtrees sets.

In order to send packets, this needs one of sendip, netcat or bash.
To flood with traffic, iperf3, iperf and netperf are supported. For
performance measurements, this relies on the sample pktgen script
pktgen_bench_xmit_mode_netif_receive.sh.

If none of the tools suitable for a given test are available, specific
tests will be skipped.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/netfilter/Makefile
tools/testing/selftests/netfilter/nft_concat_range.sh [new file with mode: 0755]