Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH nf 0/2] testing: selftests: nft_flowtable.sh: unbreak test script
@ 2022-08-16 12:15 Florian Westphal
  2022-08-16 12:15 ` [PATCH nf 1/2] testing: selftests: nft_flowtable.sh: use random netns names Florian Westphal
  2022-08-16 12:15 ` [PATCH nf 2/2] testing: selftests: nft_flowtable.sh: rework test to detect offload failure Florian Westphal
  0 siblings, 2 replies; 3+ messages in thread
From: Florian Westphal @ 2022-08-16 12:15 UTC (permalink / raw)
  To: netfilter-devel; +Cc: shuah, linux-kselftest, Florian Westphal

nft_flowtable.sh fails most of the time since
2738d9d963bd1f0 ("netfilter: flowtable: move dst_check to packet path").
Arguably the test scripts way of detecting 'offloaded' vs 'offload
failed' was always flaky/broken.

These patches fix this up:
1. first patch moves to random netns names so we don't trip
   over existing 'ns1' name (too generic...).
2. second patch reworks the 'offload appears to be non-working'
   by means of packet counters.

Because counters are only incremented when a packet is handled
by the classic forward path, check that the counter is lower than
a given threshold (25% of file size).

Florian Westphal (2):
  testing: selftests: nft_flowtable.sh: use random netns names
  testing: selftests: nft_flowtable.sh: rework test to detect offload
    failure

 .../selftests/netfilter/nft_flowtable.sh      | 377 ++++++++++--------
 1 file changed, 207 insertions(+), 170 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-16 12:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 12:15 [PATCH nf 0/2] testing: selftests: nft_flowtable.sh: unbreak test script Florian Westphal
2022-08-16 12:15 ` [PATCH nf 1/2] testing: selftests: nft_flowtable.sh: use random netns names Florian Westphal
2022-08-16 12:15 ` [PATCH nf 2/2] testing: selftests: nft_flowtable.sh: rework test to detect offload failure Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox