Skip to contentSkip to conversation

io_uring/zcrx: selftests: fix setting ntuple rule into rss

PATCH Applied David Wei 2 participants 3 messages May 3, 2025 – May 7, 2025

Subsystems (3)
lore
Share & tools
lore

David Wei

author
#0 lore raw

PATCH 1/1 io_uring/zcrx: selftests: fix setting ntuple rule into rss

Fix ethtool syntax for setting ntuple rule into rss. It should be context' instead of action'.

---
 tools/testing/selftests/drivers/net/hw/iou-zcrx.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tools/testing/selftests/drivers/net/hw/iou-zcrx.py +5 -5
index aef43f82edd5..9c03fd777f3d 100755
@@ -19,8 +19,8 @@ def _get_combined_channels(cfg):
     return int(values[1])
 
 
-def _create_rss_ctx(cfg, chans):
-    output = ethtool(f"-X {cfg.ifname} context new start {chans - 1} equal 1", host=cfg.remote).stdout
+def _create_rss_ctx(cfg, chan):
+    output = ethtool(f"-X {cfg.ifname} context new start {chan} equal 1", host=cfg.remote).stdout
     values = re.search(r'New RSS context is (\d+)', output).group(1)
     ctx_id = int(values)
     return (ctx_id, defer(ethtool, f"-X {cfg.ifname} delete context {ctx_id}", host=cfg.remote))
@@ -32,8 +32,8 @@ def _set_flow_rule(cfg, port, chan):
     return int(values)
 
 
-def _set_flow_rule_rss(cfg, port, chan):
-    output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {port} action {chan}", host=cfg.remote).stdout
+def _set_flow_rule_rss(cfg, port, ctx_id):
+    output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {port} context {ctx_id}", host=cfg.remote).stdout
     values = re.search(r'ID (\d+)', output).group(1)
     return int(values)
 
@@ -121,7 +121,7 @@ def test_zcrx_rss(cfg) -> None:
     ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote)
     defer(ethtool, f"-X {cfg.ifname} default", host=cfg.remote)
 
-    (ctx_id, delete_ctx) = _create_rss_ctx(cfg, combined_chans)
+    (ctx_id, delete_ctx) = _create_rss_ctx(cfg, combined_chans - 1)
     flow_rule_id = _set_flow_rule_rss(cfg, port, ctx_id)
     defer(ethtool, f"-N {cfg.ifname} delete {flow_rule_id}", host=cfg.remote)
 
Signature · 1 line
2.47.1
author
#1 lore raw
Quoted 4 lines · David Wei

Fix ethtool syntax for setting ntuple rule into rss. It should be context' instead of action'.

Sorry I accidentally sent the wrong patch. :(

#2 lore raw
In reply to David Wei
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 7 lines · On Fri, 2 May 2025 21:30:07 -0700 you wrote:

Fix ethtool syntax for setting ntuple rule into rss. It should be context' instead of action'.

---
 tools/testing/selftests/drivers/net/hw/iou-zcrx.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Here is the summary with links:
- [net-next,v1] io_uring/zcrx: selftests: fix setting ntuple rule into rss

    https://git.kernel.org/netdev/net-next/c/df6a69bc8f31

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html