netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Damato <jdamato@fastly.com>
To: David Wei <dw@davidwei.uk>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v1 2/3] io_uring/zcrx: selftests: set hds_thresh to 0
Date: Fri, 25 Apr 2025 15:50:17 -0700	[thread overview]
Message-ID: <aAwRqSj8F--3Dg2O@LQ3V64L9R2> (raw)
In-Reply-To: <20250425022049.3474590-3-dw@davidwei.uk>

On Thu, Apr 24, 2025 at 07:20:48PM -0700, David Wei wrote:
> Setting hds_thresh to 0 is required for queue reset.
> 
> Signed-off-by: David Wei <dw@davidwei.uk>
> ---
>  .../testing/selftests/drivers/net/hw/iou-zcrx.py | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
> index 698f29cfd7eb..0b0b6a261159 100755
> --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
> +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
> @@ -8,10 +8,11 @@ from lib.py import NetDrvEpEnv
>  from lib.py import bkg, cmd, defer, ethtool, wait_port_listen
>  
>  
> -def _get_rx_ring_entries(cfg):
> +def _get_current_settings(cfg):
>      output = ethtool(f"-g {cfg.ifname}", host=cfg.remote).stdout
> -    values = re.findall(r'RX:\s+(\d+)', output)
> -    return int(values[1])
> +    rx_ring = re.findall(r'RX:\s+(\d+)', output)
> +    hds_thresh = re.findall(r'HDS thresh:\s+(\d+)', output)
> +    return (int(rx_ring[1]), int(hds_thresh[1]))

Makes me wonder if both of these values can be parsed from ethtool
JSON output instead of regexing the "regular" output. No reason in
particular; just vaguely feels like parsing JSON is safer somehow.

Reviewed-by: Joe Damato <jdamato@fastly.com>

  parent reply	other threads:[~2025-04-25 22:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  2:20 [PATCH net-next v1 0/3] io_uring/zcrx: fix selftests and add new test for rss ctx David Wei
2025-04-25  2:20 ` [PATCH net-next v1 1/3] io_uring/zcrx: selftests: switch to using defer() for cleanup David Wei
2025-04-25 17:17   ` Simon Horman
2025-04-25 22:46   ` Joe Damato
2025-04-25  2:20 ` [PATCH net-next v1 2/3] io_uring/zcrx: selftests: set hds_thresh to 0 David Wei
2025-04-25 17:18   ` Simon Horman
2025-04-25 22:50   ` Joe Damato [this message]
2025-04-25 23:37     ` David Wei
2025-04-26  1:42       ` Jakub Kicinski
2025-04-26 18:00         ` David Wei
2025-04-25  2:20 ` [PATCH net-next v1 3/3] io_uring/zcrx: selftests: add test case for rss ctx David Wei
2025-04-25 17:18   ` Simon Horman
2025-04-25 22:55   ` Joe Damato
2025-04-25 23:38     ` David Wei
2025-04-26  1:43       ` Jakub Kicinski
2025-04-26  1:50 ` [PATCH net-next v1 0/3] io_uring/zcrx: fix selftests and add new test " 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=aAwRqSj8F--3Dg2O@LQ3V64L9R2 \
    --to=jdamato@fastly.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).