OSDN Git Service

selftests: netfilter: add zone stress test with colliding tuples
authorFlorian Westphal <fw@strlen.de>
Wed, 8 Sep 2021 12:28:39 +0000 (14:28 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 Sep 2021 01:46:55 +0000 (03:46 +0200)
commitcb89f63ba662d2b56583f4dd3dd2b7f03b6d6587
tree660406633c24c1f1562e826a4cf436f50122280f
parent0f1148abb226f3639845738cdf3d2534ceb1d059
selftests: netfilter: add zone stress test with colliding tuples

Add 20k entries to the connection tracking table, once from the
data plane, once via ctnetlink.

In both cases, each entry lives in a different conntrack zone
and addresses/ports are identical.

Expectation is that insertions work and occurs in constant time:

PASS: added 10000 entries in 1215 ms (now 10000 total, loop 1)
PASS: added 10000 entries in 1214 ms (now 20000 total, loop 2)
PASS: inserted 20000 entries from packet path in 2434 ms total
PASS: added 10000 entries in 57631 ms (now 10000 total)
PASS: added 10000 entries in 58572 ms (now 20000 total)
PASS: inserted 20000 entries via ctnetlink in 116205 ms

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/netfilter/nft_zones_many.sh [new file with mode: 0755]