[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6ExHoXv2dR_Cu0a@LQ3V64L9R2>
Date: Mon, 3 Feb 2025 13:11:58 -0800
From: Joe Damato <jdamato@...tly.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
shuah@...nel.org, ecree.xilinx@...il.com, gal@...dia.com,
przemyslaw.kitszel@...el.com
Subject: Re: [PATCH net 1/4] ethtool: rss: fix hiding unsupported fields in
dumps
On Fri, Jan 31, 2025 at 05:30:37PM -0800, Jakub Kicinski wrote:
> Commit ec6e57beaf8b ("ethtool: rss: don't report key if device
> doesn't support it") intended to stop reporting key fields for
> additional rss contexts if device has a global hashing key.
>
> Later we added dump support and the filtering wasn't properly
> added there. So we end up reporting the key fields in dumps
> but not in dos:
>
> # ./pyynl/cli.py --spec netlink/specs/ethtool.yaml --do rss-get \
> --json '{"header": {"dev-index":2}, "context": 1 }'
> {
> "header": { ... },
> "context": 1,
> "indir": [0, 1, 2, 3, ...]]
> }
>
> # ./pyynl/cli.py --spec netlink/specs/ethtool.yaml --dump rss-get
> [
> ... snip context 0 ...
> { "header": { ... },
> "context": 1,
> "indir": [0, 1, 2, 3, ...],
> -> "input_xfrm": 255,
> -> "hfunc": 1,
> -> "hkey": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
> }
> ]
>
> Hide these fields correctly.
>
> The drivers/net/hw/rss_ctx.py selftest catches this when run on
> a device with single key, already:
>
> # Check| At /root/./ksft-net-drv/drivers/net/hw/rss_ctx.py, line 381, in test_rss_context_dump:
> # Check| ksft_ne(set(data.get('hkey', [1])), {0}, "key is all zero")
> # Check failed {0} == {0} key is all zero
> not ok 8 rss_ctx.test_rss_context_dump
>
> Fixes: f6122900f4e2 ("ethtool: rss: support dumping RSS contexts")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> net/ethtool/rss.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Joe Damato <jdamato@...tly.com>
Powered by blists - more mailing lists