From: Jakub Kicinski <kuba@kernel.org>
To: David Wei <dw@davidwei.uk>
Cc: Joe Damato <jdamato@fastly.com>,
netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
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 18:42:48 -0700 [thread overview]
Message-ID: <20250425184248.226460d3@kernel.org> (raw)
In-Reply-To: <e668fa44-15be-4734-9b3f-a7b922c27c00@davidwei.uk>
On Fri, 25 Apr 2025 16:37:26 -0700 David Wei wrote:
> >> -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.
>
> Yeah I agree. JSON output isn't available for these ethtool commands as
> support for that is quite patchy. If/once there is JSON output I'd be up
> for switching to that.
Joe is right, gor -g JSON is there, IIRC the only one we use often that
doesn't have JSON is -l. You could also switch to YNL directly, fewer
dependencies. But probably not a blocker for this series.
next prev parent reply other threads:[~2025-04-26 1:42 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
2025-04-25 23:37 ` David Wei
2025-04-26 1:42 ` Jakub Kicinski [this message]
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=20250425184248.226460d3@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--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).