All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	petrm@nvidia.com, przemyslaw.kitszel@intel.com,
	willemdebruijn.kernel@gmail.com, ecree.xilinx@gmail.com,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 1/5] selftests: drv-net: rss_ctx: fix cleanup in the basic test
Date: Thu,  4 Jul 2024 18:57:21 -0700	[thread overview]
Message-ID: <20240705015725.680275-2-kuba@kernel.org> (raw)
In-Reply-To: <20240705015725.680275-1-kuba@kernel.org>

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@kernel.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()
 
     cnts = _get_rx_cnts(cfg)
     GenerateTraffic(cfg).wait_pkts_and_stop(20000)
-- 
2.45.2


  reply	other threads:[~2024-07-05  1:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05  1:57 [PATCH net-next 0/5] selftests: drv-net: rss_ctx: more tests Jakub Kicinski
2024-07-05  1:57 ` Jakub Kicinski [this message]
2024-07-06 13:53   ` [PATCH net-next 1/5] selftests: drv-net: rss_ctx: fix cleanup in the basic test Willem de Bruijn
2024-07-08 16:13     ` Jakub Kicinski
2024-07-08 16:53       ` Willem de Bruijn
2024-07-05  1:57 ` [PATCH net-next 2/5] selftests: drv-net: rss_ctx: factor out send traffic and check Jakub Kicinski
2024-07-05  1:57 ` [PATCH net-next 3/5] selftests: drv-net: rss_ctx: test queue changes vs user RSS config Jakub Kicinski
2024-07-06 14:00   ` Willem de Bruijn
2024-07-08 16:17     ` Jakub Kicinski
2024-07-08 16:56       ` Willem de Bruijn
2024-07-08 20:04         ` Jakub Kicinski
2024-07-08 20:29           ` Willem de Bruijn
2024-07-05  1:57 ` [PATCH net-next 4/5] selftests: drv-net: rss_ctx: check behavior of indirection table resizing Jakub Kicinski
2024-07-06 14:03   ` Willem de Bruijn
2024-07-05  1:57 ` [PATCH net-next 5/5] selftests: drv-net: rss_ctx: test flow rehashing without impacting traffic Jakub Kicinski
2024-07-05 10:24 ` [PATCH net-next 0/5] selftests: drv-net: rss_ctx: more tests Pavan Chebbi

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=20240705015725.680275-2-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=willemdebruijn.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.