[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAwRqSj8F--3Dg2O@LQ3V64L9R2>
Date: Fri, 25 Apr 2025 15:50:17 -0700
From: Joe Damato <jdamato@...tly.com>
To: David Wei <dw@...idwei.uk>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v1 2/3] io_uring/zcrx: selftests: set hds_thresh
to 0
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@...idwei.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@...tly.com>
Powered by blists - more mailing lists