From: Petr Machata <petrm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<netdev@vger.kernel.org>
Cc: Amit Cohen <amcohen@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
<linux-kselftest@vger.kernel.org>, Shuah Khan <shuah@kernel.org>,
"Petr Machata" <petrm@nvidia.com>, <mlxsw@nvidia.com>
Subject: [PATCH net-next 2/5] selftests: mlxsw: sch_red_core: Increase backlog size tolerance
Date: Mon, 7 Oct 2024 18:26:06 +0200 [thread overview]
Message-ID: <f54950df2a8fcba46c3ddc1053376352fa2e592b.1728316370.git.petrm@nvidia.com> (raw)
In-Reply-To: <cover.1728316370.git.petrm@nvidia.com>
Backlog fluctuates on Spectrum-4 much more than on <4. In practice we can
sample queue depth values going from about -12% to about +7% of the
configured RED limit. The test which checks the queue size has a limit of
+-10%, and as a result often fails. We attempted to fix the issue by
busywaiting for several seconds hoping to get within the bounds, but that
still proved to be too noisy (or the wait time would be impractically
long). Unfortunately we have to bump the value tolerance from 10% to 15%,
which in this patch do.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
---
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
index 299e06a5808c..a25a15eb6d31 100644
--- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
@@ -532,10 +532,11 @@ do_red_test()
check_fail $? "Traffic went into backlog instead of being early-dropped"
pct=$(check_marking get_nmarked $vlan "== 0")
check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0."
+ backlog=$(get_qdisc_backlog $vlan)
local diff=$((limit - backlog))
pct=$((100 * diff / limit))
- ((-10 <= pct && pct <= 10))
- check_err $? "backlog $backlog / $limit expected <= 10% distance"
+ ((-15 <= pct && pct <= 15))
+ check_err $? "backlog $backlog / $limit expected <= 15% distance"
log_test "TC $((vlan - 10)): RED backlog > limit"
stop_traffic
--
2.45.0
next prev parent reply other threads:[~2024-10-07 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 16:26 [PATCH net-next 0/5] selftests: mlxsw: Stabilize RED tests Petr Machata
2024-10-07 16:26 ` [PATCH net-next 1/5] selftests: mlxsw: sch_red_ets: Increase required backlog Petr Machata
2024-10-07 16:26 ` Petr Machata [this message]
2024-10-07 16:26 ` [PATCH net-next 3/5] selftests: mlxsw: sch_red_core: Sleep before querying queue depth Petr Machata
2024-10-07 16:26 ` [PATCH net-next 4/5] selftests: mlxsw: sch_red_core: Send more packets for drop tests Petr Machata
2024-10-07 16:26 ` [PATCH net-next 5/5] selftests: mlxsw: sch_red_core: Lower TBF rate Petr Machata
2024-10-08 23:20 ` [PATCH net-next 0/5] selftests: mlxsw: Stabilize RED tests patchwork-bot+netdevbpf
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=f54950df2a8fcba46c3ddc1053376352fa2e592b.1728316370.git.petrm@nvidia.com \
--to=petrm@nvidia.com \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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