netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Florian Westphal <fw@strlen.de>,
	netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next] selftests: netfilter: nft_queue.sh: reduce test file size for debug build
Date: Thu, 29 Aug 2024 10:01:09 +0200	[thread overview]
Message-ID: <20240829080109.GB30766@breakpoint.cc> (raw)
In-Reply-To: <20240828154940.447ddc7d@kernel.org>

Jakub Kicinski <kuba@kernel.org> wrote:
> On Tue, 27 Aug 2024 11:00:12 +0200 Florian Westphal wrote:
> > The sctp selftest is very slow on debug kernels.
> 
> I think there may be something more going on here? :(
> 
> For reference net-next-2024-08-27--12-00 is when this fix got queued:
> 
> https://netdev.bots.linux.dev/contest.html?executor=vmksft-nf-dbg&test=nft-queue-sh
> 
> Since then we still see occasional flakes. But take a look at 
> the runtime. If it's happy the test case takes under a minute.
> When it's unhappy it times out (after 5 minutes). I'll increase
> the timeout to 10 minutes, but 1min vs 5min feels like it may
> be getting stuck rather than being slow..

Yes, its stuck.  Only reason I could imagine is that there is a 2s
delay between starting the nf_queue test prog and the first packet
getting sent.  That would make the listener exit early and then
socat sender would hang.

I'll test following tomorrow on an old / slow machine:

diff --git a/tools/testing/selftests/net/netfilter/nft_queue.sh b/tools/testing/selftests/net/netfilter/nft_queue.sh
--- a/tools/testing/selftests/net/netfilter/nft_queue.sh
+++ b/tools/testing/selftests/net/netfilter/nft_queue.sh
@@ -39,7 +39,10 @@ TMPFILE2=$(mktemp)
 TMPFILE3=$(mktemp)
 
 TMPINPUT=$(mktemp)
-dd conv=sparse status=none if=/dev/zero bs=1M count=200 of="$TMPINPUT"
+
+COUNT=200
+[ "$KSFT_MACHINE_SLOW" = "yes" ] && COUNT=25
+dd conv=sparse status=none if=/dev/zero bs=1M count=$COUNT of="$TMPINPUT"
 
 if ! ip link add veth0 netns "$nsrouter" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1; then
     echo "SKIP: No virtual ethernet pair device support in kernel"
@@ -398,7 +401,7 @@ EOF
 
 	busywait "$BUSYWAIT_TIMEOUT" sctp_listener_ready "$ns2"
 
-	ip netns exec "$nsrouter" ./nf_queue -q 10 -G -t "$timeout" &
+	ip netns exec "$nsrouter" ./nf_queue -q 10 -G &
 	local nfqpid=$!
 
 	ip netns exec "$ns1" socat -u STDIN SCTP:10.0.2.99:12345 <"$TMPINPUT" >/dev/null
@@ -409,6 +412,7 @@ EOF
 	fi
 
 	wait "$rpid" && echo "PASS: sctp and nfqueue in forward chain"
+	kill "$nfqpid"
 
 	if ! diff -u "$TMPINPUT" "$TMPFILE1" ; then
 		echo "FAIL: lost packets?!" 1>&2
@@ -434,7 +438,7 @@ EOF
 
 	busywait "$BUSYWAIT_TIMEOUT" sctp_listener_ready "$ns2"
 
-	ip netns exec "$ns1" ./nf_queue -q 11 -t "$timeout" &
+	ip netns exec "$ns1" ./nf_queue -q 11 &
 	local nfqpid=$!
 
 	ip netns exec "$ns1" socat -u STDIN SCTP:10.0.2.99:12345 <"$TMPINPUT" >/dev/null
@@ -446,6 +450,7 @@ EOF
 
 	# must wait before checking completeness of output file.
 	wait "$rpid" && echo "PASS: sctp and nfqueue in output chain with GSO"
+	kill "$nfqpid"
 
 	if ! diff -u "$TMPINPUT" "$TMPFILE1" ; then
 		echo "FAIL: lost packets?!" 1>&2
-- 
2.46.0



  reply	other threads:[~2024-08-29  8:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 22:19 [PATCH net-next 0/9] Netfilter updates for net-next Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 1/9] netfilter: nfnetlink_queue: unbreak SCTP traffic Pablo Neira Ayuso
2024-08-26 15:50   ` patchwork-bot+netdevbpf
2024-08-22 22:19 ` [PATCH net-next 2/9] selftests: netfilter: nft_queue.sh: sctp coverage Pablo Neira Ayuso
2024-08-27  2:25   ` Jakub Kicinski
2024-08-27  9:00     ` [PATCH net-next] selftests: netfilter: nft_queue.sh: reduce test file size for debug build Florian Westphal
2024-08-28 14:48       ` Pablo Neira Ayuso
2024-08-28 22:49       ` Jakub Kicinski
2024-08-29  8:01         ` Florian Westphal [this message]
2024-08-29  8:35           ` Paolo Abeni
2024-08-29  8:40       ` patchwork-bot+netdevbpf
2024-08-22 22:19 ` [PATCH net-next 3/9] netfilter: nfnetlink: convert kfree_skb to consume_skb Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 4/9] netfilter: nf_tables: store new sets in dedicated list Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 5/9] netfilter: nf_tables: do not remove elements if set backend implements .abort Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 6/9] netfilter: move nf_ct_netns_get out of nf_conncount_init Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 7/9] netfilter: nf_tables: pass context structure to nft_parse_register_load Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 8/9] netfilter: nf_tables: allow loads only when register is initialized Pablo Neira Ayuso
2024-08-22 22:19 ` [PATCH net-next 9/9] netfilter: nf_tables: don't initialize registers in nft_do_chain() Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240829080109.GB30766@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).