lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250625130404.6c8fa985@kernel.org>
Date: Wed, 25 Jun 2025 13:04:04 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
 maxime.chevallier@...tlin.com, sdf@...ichev.me, jdamato@...tly.com,
 ecree.xilinx@...il.com
Subject: Re: [PATCH net-next v2 8/8] selftests: drv-net: test RSS Netlink
 notifications

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 :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ