Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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'.

Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://patch.msgid.link/20250503043007.857215-1-dw@davidwei.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

David Wei and committed by
Jakub Kicinski
df6a69bc 075001c9

+5 -5
+5 -5
tools/testing/selftests/drivers/net/hw/iou-zcrx.py
··· 19 19 return int(values[1]) 20 20 21 21 22 - def _create_rss_ctx(cfg, chans): 23 - output = ethtool(f"-X {cfg.ifname} context new start {chans - 1} equal 1", host=cfg.remote).stdout 22 + def _create_rss_ctx(cfg, chan): 23 + output = ethtool(f"-X {cfg.ifname} context new start {chan} equal 1", host=cfg.remote).stdout 24 24 values = re.search(r'New RSS context is (\d+)', output).group(1) 25 25 ctx_id = int(values) 26 26 return (ctx_id, defer(ethtool, f"-X {cfg.ifname} delete context {ctx_id}", host=cfg.remote)) ··· 32 32 return int(values) 33 33 34 34 35 - def _set_flow_rule_rss(cfg, port, chan): 36 - output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {port} action {chan}", host=cfg.remote).stdout 35 + def _set_flow_rule_rss(cfg, port, ctx_id): 36 + output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {port} context {ctx_id}", host=cfg.remote).stdout 37 37 values = re.search(r'ID (\d+)', output).group(1) 38 38 return int(values) 39 39 ··· 121 121 ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote) 122 122 defer(ethtool, f"-X {cfg.ifname} default", host=cfg.remote) 123 123 124 - (ctx_id, delete_ctx) = _create_rss_ctx(cfg, combined_chans) 124 + (ctx_id, delete_ctx) = _create_rss_ctx(cfg, combined_chans - 1) 125 125 flow_rule_id = _set_flow_rule_rss(cfg, port, ctx_id) 126 126 defer(ethtool, f"-N {cfg.ifname} delete {flow_rule_id}", host=cfg.remote) 127 127