[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66894c659cee8_12869e2942c@willemb.c.googlers.com.notmuch>
Date: Sat, 06 Jul 2024 09:53:41 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>,
davem@...emloft.net
Cc: netdev@...r.kernel.org,
edumazet@...gle.com,
pabeni@...hat.com,
petrm@...dia.com,
przemyslaw.kitszel@...el.com,
willemdebruijn.kernel@...il.com,
ecree.xilinx@...il.com,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next 1/5] selftests: drv-net: rss_ctx: fix cleanup in
the basic test
Jakub Kicinski wrote:
> The basic test may fail without resetting the RSS indir table.
> While at it reformat the doc a tiny bit.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> tools/testing/selftests/drivers/net/hw/rss_ctx.py | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/drivers/net/hw/rss_ctx.py b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> index 475f2a63fcd5..de2a55c0f35c 100755
> --- a/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> +++ b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> @@ -64,9 +64,8 @@ from lib.py import ethtool, ip, defer, GenerateTraffic, CmdExitFailure
>
>
> def test_rss_key_indir(cfg):
> - """
> - Test basics like updating the main RSS key and indirection table.
> - """
> + """Test basics like updating the main RSS key and indirection table."""
> +
> if len(_get_rx_cnts(cfg)) < 2:
> KsftSkipEx("Device has only one queue (or doesn't support queue stats)")
>
> @@ -89,6 +88,7 @@ from lib.py import ethtool, ip, defer, GenerateTraffic, CmdExitFailure
>
> # Set the indirection table
> ethtool(f"-X {cfg.ifname} equal 2")
> + reset_indir = defer(ethtool, f"-X {cfg.ifname} default")
> data = get_rss(cfg)
> ksft_eq(0, min(data['rss-indirection-table']))
> ksft_eq(1, max(data['rss-indirection-table']))
> @@ -104,7 +104,7 @@ from lib.py import ethtool, ip, defer, GenerateTraffic, CmdExitFailure
> ksft_eq(sum(cnts[2:]), 0, "traffic on unused queues: " + str(cnts))
>
> # Restore, and check traffic gets spread again
> - ethtool(f"-X {cfg.ifname} default")
> + reset_indir.exec()
When is this explicit exec needed?
Powered by blists - more mailing lists