linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, shuah@kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	posk@google.com, cascardo@canonical.com
Subject: [PATCH] selftests: net: ip_defrag: increase netdev_max_backlog
Date: Wed,  4 Dec 2019 16:53:21 -0300	[thread overview]
Message-ID: <20191204195321.406365-1-cascardo@canonical.com> (raw)

When using fragments with size 8 and payload larger than 8000, the backlog
might fill up and packets will be dropped, causing the test to fail. This
happens often enough when conntrack is on during the IPv6 test.

As the larger payload in the test is 10000, using a backlog of 1250 allow
the test to run repeatedly without failure. At least a 1000 runs were
possible with no failures, when usually less than 50 runs were good enough
for showing a failure.

As netdev_max_backlog is not a pernet setting, this sets the backlog to
1000 during exit to prevent disturbing following tests.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fixes: 4c3510483d26 (selftests: net: ip_defrag: cover new IPv6 defrag behavior)
---
 tools/testing/selftests/net/ip_defrag.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/net/ip_defrag.sh b/tools/testing/selftests/net/ip_defrag.sh
index 15d3489ecd9c..c91cfecfa245 100755
--- a/tools/testing/selftests/net/ip_defrag.sh
+++ b/tools/testing/selftests/net/ip_defrag.sh
@@ -12,6 +12,8 @@ setup() {
 	ip netns add "${NETNS}"
 	ip -netns "${NETNS}" link set lo up
 
+	sysctl -w net.core.netdev_max_backlog=1250 >/dev/null 2>&1
+
 	ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_high_thresh=9000000 >/dev/null 2>&1
 	ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_low_thresh=7000000 >/dev/null 2>&1
 	ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_time=1 >/dev/null 2>&1
@@ -30,6 +32,7 @@ setup() {
 
 cleanup() {
 	ip netns del "${NETNS}"
+	sysctl -w net.core.netdev_max_backlog=1000 >/dev/null 2>&1
 }
 
 trap cleanup EXIT
-- 
2.24.0


             reply	other threads:[~2019-12-04 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 19:53 Thadeu Lima de Souza Cascardo [this message]
2019-12-04 20:03 ` [PATCH] selftests: net: ip_defrag: increase netdev_max_backlog Eric Dumazet
2019-12-06 12:17   ` Thadeu Lima de Souza Cascardo
2019-12-06 13:41     ` Eric Dumazet
2019-12-06 14:50       ` Thadeu Lima de Souza Cascardo
2019-12-06 15:50         ` Thadeu Lima de Souza Cascardo

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=20191204195321.406365-1-cascardo@canonical.com \
    --to=cascardo@canonical.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=posk@google.com \
    --cc=shuah@kernel.org \
    /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).