All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, bpf@vger.kernel.org,
	shuah@kernel.org, johndale@cisco.com,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net 8/9] selftests: drv-net: pp_alloc_fail: lower traffic expectations
Date: Sat, 4 Oct 2025 17:44:05 +0100	[thread overview]
Message-ID: <20251004164405.GE3060232@horms.kernel.org> (raw)
In-Reply-To: <20251003233025.1157158-9-kuba@kernel.org>

On Fri, Oct 03, 2025 at 04:30:24PM -0700, Jakub Kicinski wrote:

...

> @@ -91,9 +92,14 @@ from lib.py import cmd, tool, GenerateTraffic
>  
>          if s2['rx-alloc-fail'] - s1['rx-alloc-fail'] < 1:
>              raise KsftSkipEx("Allocation failures not increasing")
> -        if s2['rx-alloc-fail'] - s1['rx-alloc-fail'] < 100:
> -            raise KsftSkipEx("Allocation increasing too slowly", s2['rx-alloc-fail'] - s1['rx-alloc-fail'],
> -                             "packets:", s2['rx-packets'] - s1['rx-packets'])
> +        pkts = s2['rx-packets'] - s1['rx-packets']
> +        # Expecting one failure per 512 buffers, 3.1x safety margin
> +        want_fails = math.floor(pkts / 512 / 3.1)
> +        seen_fails = s2['rx-alloc-fail'] - s1['rx-alloc-fail']
> +        if s2['rx-alloc-fail'] - s1['rx-alloc-fail'] < want_fails:

I guess this could be as follows.
(Completely untested!)

        if seen_fails < want_fails:

> +            raise KsftSkipEx("Allocation increasing too slowly", seen_fails,
> +                             "packets:", pkts)
> +        ksft_pr(f"Seen: pkts:{pkts} fails:{seen_fails} (pass thrs:{want_fails})")
>  
>          # Basic failures are fine, try to wobble some settings to catch extra failures
>          check_traffic_flowing()

The nit above withstanding, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2025-10-04 16:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 23:30 [PATCH net 0/9] eth: fbnic: fix XDP_TX and XDP vs qstats Jakub Kicinski
2025-10-03 23:30 ` [PATCH net 1/9] eth: fbnic: fix missing programming of the default descriptor Jakub Kicinski
2025-10-04 16:44   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 2/9] eth: fbnic: fix accounting of XDP packets Jakub Kicinski
2025-10-04 16:45   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 3/9] eth: fbnic: fix saving stats from XDP_TX rings on close Jakub Kicinski
2025-10-04 16:45   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 4/9] selftests: drv-net: xdp: rename netnl to ethnl Jakub Kicinski
2025-10-04 16:46   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 5/9] selftests: drv-net: xdp: add test for interface level qstats Jakub Kicinski
2025-10-04 16:47   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 6/9] eth: fbnic: fix reporting of alloc_failed qstats Jakub Kicinski
2025-10-04 16:48   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 7/9] selftests: drv-net: fix linter warnings in pp_alloc_fail Jakub Kicinski
2025-10-04 16:48   ` Simon Horman
2025-10-03 23:30 ` [PATCH net 8/9] selftests: drv-net: pp_alloc_fail: lower traffic expectations Jakub Kicinski
2025-10-04 16:44   ` Simon Horman [this message]
2025-10-03 23:30 ` [PATCH net 9/9] selftests: drv-net: pp_alloc_fail: add necessary optoins to config Jakub Kicinski
2025-10-04 16:48   ` Simon Horman

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=20251004164405.GE3060232@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johndale@cisco.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.