netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	maxime.chevallier@bootlin.com, sdf@fomichev.me,
	jdamato@fastly.com, ecree.xilinx@gmail.com
Subject: Re: [PATCH net-next v2 8/8] selftests: drv-net: test RSS Netlink notifications
Date: Wed, 25 Jun 2025 13:04:04 -0700	[thread overview]
Message-ID: <20250625130404.6c8fa985@kernel.org> (raw)
In-Reply-To: <m2sejocfw2.fsf@gmail.com>

On Wed, 25 Jun 2025 10:46:53 +0100 Donald Hunter wrote:
> > +def _ethtool_create(cfg, act, opts):
> > +    output = ethtool(f"{act} {cfg.ifname} {opts}").stdout
> > +    # Output will be something like: "New RSS context is 1" or
> > +    # "Added rule with ID 7", we want the integer from the end
> > +    return int(output.split()[-1])  
> 
> I think .split() is not required because you can access strings as
> arrays.
> 
> Will this only ever need to handle single digit values?

nosir, IIUC split splits on whitespace, so from:

	"Added rule with ID 7"  -> [.."ID", "7"]
	"Added rule with ID 71" -> [.."ID", "71"]

and we take the last elem, the ID. We use similar code in the rss_ctx
test, I think it works..

Unfortunately there is no plan to migrate the flow steering to netlink.
And ethtool only supports JSON output in the netlink code :S
Mountains of technical debt :)

  reply	other threads:[~2025-06-25 20:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 23:17 [PATCH net-next v2 0/8] net: ethtool: rss: add notifications Jakub Kicinski
2025-06-23 23:17 ` [PATCH net-next v2 1/8] netlink: specs: add the multicast group name to spec Jakub Kicinski
2025-06-23 23:17 ` [PATCH net-next v2 2/8] net: ethtool: dynamically allocate full req size req Jakub Kicinski
2025-06-24  5:57   ` Maxime Chevallier
2025-06-23 23:17 ` [PATCH net-next v2 3/8] net: ethtool: call .parse_request for SET handlers Jakub Kicinski
2025-06-24  5:57   ` Maxime Chevallier
2025-06-23 23:17 ` [PATCH net-next v2 4/8] net: ethtool: remove the data argument from ethtool_notify() Jakub Kicinski
2025-06-24  5:56   ` Maxime Chevallier
2025-06-23 23:17 ` [PATCH net-next v2 5/8] net: ethtool: copy req_info from SET to NTF Jakub Kicinski
2025-06-24  5:55   ` Maxime Chevallier
2025-06-23 23:17 ` [PATCH net-next v2 6/8] net: ethtool: rss: add notifications Jakub Kicinski
2025-06-23 23:17 ` [PATCH net-next v2 7/8] doc: ethtool: mark ETHTOOL_GRXFHINDIR as reimplemented Jakub Kicinski
2025-06-25  8:55   ` Donald Hunter
2025-06-23 23:17 ` [PATCH net-next v2 8/8] selftests: drv-net: test RSS Netlink notifications Jakub Kicinski
2025-06-25  9:46   ` Donald Hunter
2025-06-25 20:04     ` Jakub Kicinski [this message]
2025-06-25 21:55       ` Donald Hunter
2025-06-24  6:00 ` [PATCH net-next v2 0/8] net: ethtool: rss: add notifications Maxime Chevallier
2025-06-24 14:13   ` Jakub Kicinski
2025-06-25 22:50 ` 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=20250625130404.6c8fa985@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /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).