selftests: netfilter: add ipset flush vs. concurrent insert perf test
Subsystems (3)
Florian Westphal
maintainerPATCH 1/1 selftests: netfilter: add ipset flush vs. concurrent insert perf test
Add (not run by default) selftest that measures latency while flushing a large hash:net set contends with concurrent packet-path insertions (via "-j SET --add-set").
Signed-off-by Florian Westphal <[email protected]>
---
Artifact from LLM trying to convince me that rhashtable conversion sucks and makes flush too slow. Since this doesn't hurt and might come in useful later, sending this so its archived on lore.
I'm not sure its worth applying it, ever.
.../testing/selftests/net/netfilter/Makefile | 5 +- tools/testing/selftests/net/netfilter/config | 3 + .../net/netfilter/ipset_flush_perf.sh | 105 ++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/net/netfilter/ipset_flush_perf.sh
tools/testing/selftests/net/netfilter/Makefile +4 -1
@@ -45,7 +45,10 @@ TEST_PROGS := \ xt_string.sh \ # end of TEST_PROGS -TEST_PROGS_EXTENDED = nft_concat_range_perf.sh +TEST_PROGS_EXTENDED = \ + ipset_flush_perf.sh \ + nft_concat_range_perf.sh \ +# end of TEST_PROGS_EXTENDED TEST_GEN_FILES = \ audit_logread \
tools/testing/selftests/net/netfilter/config +3 -0
@@ -32,6 +32,8 @@ CONFIG_IP_NF_MATCH_RPFILTER=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_RAW=m CONFIG_IP_SCTP=m +CONFIG_IP_SET=m +CONFIG_IP_SET_HASH_NET=m CONFIG_IPV6=y CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_TUNNEL=m
@@ -53,6 +55,7 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m CONFIG_NETFILTER_XT_MATCH_STATE=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_NAT=m +CONFIG_NETFILTER_XT_SET=m CONFIG_NETFILTER_XT_TARGET_REDIRECT=m CONFIG_NET_IPIP=m CONFIG_NET_L3_MASTER_DEV=y
tools/testing/selftests/net/netfilter/ipset_flush_perf.sh new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.56.0