public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
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, shuah@kernel•org,
	willemb@google•com, petrm@nvidia•com, donald.hunter@gmail•com,
	michael.chan@broadcom•com, pavan.chebbi@broadcom•com,
	linux-kselftest@vger•kernel.org, Jakub Kicinski <kuba@kernel•org>
Subject: [PATCH net-next v2 5/9] selftests: drv-net: give HW stats sync time extra 25% of margin
Date: Fri,  6 Feb 2026 16:35:05 -0800	[thread overview]
Message-ID: <20260207003509.3927744-6-kuba@kernel.org> (raw)
In-Reply-To: <20260207003509.3927744-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>
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 41cc248ac848..39a98eb2592e 100644
--- a/tools/testing/selftests/drivers/net/lib/py/env.py
+++ b/tools/testing/selftests/drivers/net/lib/py/env.py
@@ -285,7 +285,7 @@ from .remote import Remote
                 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


  parent reply	other threads:[~2026-02-07  0:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-07  0:35 [PATCH net-next v2 0/9] net: stats, tools, driver tests for HW GRO Jakub Kicinski
2026-02-07  0:35 ` [PATCH net-next v2 1/9] eth: bnxt: gather and report HW-GRO stats Jakub Kicinski
2026-02-08  0:09   ` Michael Chan
2026-02-11  1:51     ` Jakub Kicinski
2026-02-07  0:35 ` [PATCH net-next v2 2/9] tools: ynltool: factor out qstat dumping Jakub Kicinski
2026-02-07  0:35 ` [PATCH net-next v2 3/9] tools: ynltool: add qstats analysis for HW-GRO efficiency / savings Jakub Kicinski
2026-02-09  9:43   ` Petr Machata
2026-02-07  0:35 ` [PATCH net-next v2 4/9] selftests: net: move gro to lib for HW vs SW reuse Jakub Kicinski
2026-02-09  2:36   ` Willem de Bruijn
2026-02-07  0:35 ` Jakub Kicinski [this message]
2026-02-09  2:37   ` [PATCH net-next v2 5/9] selftests: drv-net: give HW stats sync time extra 25% of margin Willem de Bruijn
2026-02-07  0:35 ` [PATCH net-next v2 6/9] selftests: drv-net: gro: use SO_TXTIME to schedule packets together Jakub Kicinski
2026-02-09  2:39   ` Willem de Bruijn
2026-02-11  1:56     ` Jakub Kicinski
2026-02-11  3:15       ` Willem de Bruijn
2026-02-11  3:48         ` Jakub Kicinski
2026-02-11  4:21           ` Willem de Bruijn
2026-02-11 17:00             ` Jakub Kicinski
2026-02-11 17:22               ` Willem de Bruijn
2026-02-07  0:35 ` [PATCH net-next v2 7/9] selftests: drv-net: gro: test GRO stats Jakub Kicinski
2026-02-07  0:35 ` [PATCH net-next v2 8/9] selftests: drv-net: gro: add test for packet ordering Jakub Kicinski
2026-02-07  0:35 ` [PATCH net-next v2 9/9] selftests: drv-net: gro: add a test for GRO depth 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=20260207003509.3927744-6-kuba@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=andrew+netdev@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=donald.hunter@gmail$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=horms@kernel$(echo .)org \
    --cc=linux-kselftest@vger$(echo .)kernel.org \
    --cc=michael.chan@broadcom$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=pavan.chebbi@broadcom$(echo .)com \
    --cc=petrm@nvidia$(echo .)com \
    --cc=shuah@kernel$(echo .)org \
    --cc=willemb@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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