From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
linux-kselftest@vger.kernel.org, shuah@kernel.org,
willemb@google.com, petrm@nvidia.com, dw@davidwei.uk,
mst@redhat.com, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next v3 2/6] selftests: drv-net: give HW stats sync time extra 25% of margin
Date: Mon, 16 Mar 2026 15:45:01 -0700 [thread overview]
Message-ID: <20260316224505.279672-3-kuba@kernel.org> (raw)
In-Reply-To: <20260316224505.279672-1-kuba@kernel.org>
There are transient failures for devices which update stats
periodically, especially if it's the FW DMA'ing the stats
rather than host periodic work querying the FW. Wait 25%
longer than strictly necessary.
For devices which don't report stats-block-usecs we retain
25 msec as the default wait time (0.025sec == 20,000usec * 1.25).
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
tools/testing/selftests/drivers/net/lib/py/env.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/lib/py/env.py b/tools/testing/selftests/drivers/net/lib/py/env.py
index ccff345fe1c1..6a71c7e7f136 100644
--- a/tools/testing/selftests/drivers/net/lib/py/env.py
+++ b/tools/testing/selftests/drivers/net/lib/py/env.py
@@ -288,8 +288,8 @@ from . import bpftool, RtnlFamily, Netlink
if "Operation not supported" not in e.cmd.stderr:
raise
- self._stats_settle_time = 0.025 + \
- data.get('stats-block-usecs', 0) / 1000 / 1000
+ self._stats_settle_time = \
+ 1.25 * data.get('stats-block-usecs', 20000) / 1000 / 1000
time.sleep(self._stats_settle_time)
--
2.53.0
next prev parent reply other threads:[~2026-03-16 22:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 22:44 [PATCH net-next v3 0/6] selftests: drv-net: driver tests for HW GRO Jakub Kicinski
2026-03-16 22:45 ` [PATCH net-next v3 1/6] selftests: net: move gro to lib for HW vs SW reuse Jakub Kicinski
2026-03-16 22:45 ` Jakub Kicinski [this message]
2026-03-16 22:45 ` [PATCH net-next v3 3/6] selftests: drv-net: gro: use SO_TXTIME to schedule packets together Jakub Kicinski
2026-03-16 22:45 ` [PATCH net-next v3 4/6] selftests: drv-net: gro: test GRO stats Jakub Kicinski
2026-03-16 22:45 ` [PATCH net-next v3 5/6] selftests: drv-net: gro: add test for packet ordering Jakub Kicinski
2026-03-16 22:45 ` [PATCH net-next v3 6/6] selftests: drv-net: gro: add a test for GRO depth Jakub Kicinski
2026-03-17 18:05 ` Jakub Kicinski
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=20260316224505.279672-3-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=willemb@google.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