Skip to contentSkip to conversation

io_uring/zcrx: enable tcp-data-split in selftest

PATCH Applied David Wei 3 participants 5 messages Apr 9, 2025 – Apr 11, 2025

Subsystems (3)
lore
Share & tools
lore

David Wei

author
#0 lore raw

PATCH 1/1 io_uring/zcrx: enable tcp-data-split in selftest

For bnxt when the agg ring is used then tcp-data-split is automatically reported to be enabled, but __net_mp_open_rxq() requires tcp-data-split to be explicitly enabled by the user.

Enable tcp-data-split explicitly in io_uring zc rx selftest.

---
 tools/testing/selftests/drivers/net/hw/iou-zcrx.py | 4 ++++
 1 file changed, 4 insertions(+)
tools/testing/selftests/drivers/net/hw/iou-zcrx.py +4 -0
index 9f271ab6ec04..6a0378e06cab 100755
@@ -35,6 +35,7 @@ def test_zcrx(cfg) -> None:
     rx_ring = _get_rx_ring_entries(cfg)
 
     try:
+        ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote)
         ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote)
         ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote)
         flow_rule_id = _set_flow_rule(cfg, combined_chans - 1)
@@ -48,6 +49,7 @@ def test_zcrx(cfg) -> None:
         ethtool(f"-N {cfg.ifname} delete {flow_rule_id}", host=cfg.remote)
         ethtool(f"-X {cfg.ifname} default", host=cfg.remote)
         ethtool(f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote)
+        ethtool(f"-G {cfg.ifname} tcp-data-split auto", host=cfg.remote)
 
 
 def test_zcrx_oneshot(cfg) -> None:
@@ -59,6 +61,7 @@ def test_zcrx_oneshot(cfg) -> None:
     rx_ring = _get_rx_ring_entries(cfg)
 
     try:
+        ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote)
         ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote)
         ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote)
         flow_rule_id = _set_flow_rule(cfg, combined_chans - 1)
@@ -72,6 +75,7 @@ def test_zcrx_oneshot(cfg) -> None:
         ethtool(f"-N {cfg.ifname} delete {flow_rule_id}", host=cfg.remote)
         ethtool(f"-X {cfg.ifname} default", host=cfg.remote)
         ethtool(f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote)
+        ethtool(f"-G {cfg.ifname} tcp-data-split auto", host=cfg.remote)
 
 
 def main() -> None:
Signature · 1 line
2.47.1
maintainer
#1 lore raw

tools/testing/selftests/drivers/net/hw/iou-zcrx.py def test_zcrx(cfg) -> None: · line 38

Quoted 13 lines · On Wed, 9 Apr 2025 09:31:53 -0700 David Wei wrote:

For bnxt when the agg ring is used then tcp-data-split is automatically reported to be enabled, but __net_mp_open_rxq() requires tcp-data-split to be explicitly enabled by the user.

tools/testing/selftests/drivers/net/hw/iou-zcrx.py +1 -0
index 9f271ab6ec04..6a0378e06cab 100755
@@ -35,6 +35,7 @@ def test_zcrx(cfg) -> None:
     rx_ring = _get_rx_ring_entries(cfg)
 
     try:
+        ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote)

You should really use defer() to register the "undo" actions individually. Something like:

ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote) defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote) ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote) defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote) ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote) defer(ethtool, f"-X {cfg.ifname} default", host=cfg.remote)
...

This patch is fine. But could you follow up and convert the test fully?

author
#2 lore raw
Quoted 26 lines · Jakub Kicinski

tools/testing/selftests/drivers/net/hw/iou-zcrx.py def test_zcrx(cfg) -> None: · line 38

Quoted 13 lines · On Wed, 9 Apr 2025 09:31:53 -0700 David Wei wrote:

For bnxt when the agg ring is used then tcp-data-split is automatically reported to be enabled, but __net_mp_open_rxq() requires tcp-data-split to be explicitly enabled by the user.

tools/testing/selftests/drivers/net/hw/iou-zcrx.py +1 -0
index 9f271ab6ec04..6a0378e06cab 100755
@@ -35,6 +35,7 @@ def test_zcrx(cfg) -> None:
     rx_ring = _get_rx_ring_entries(cfg)
 
     try:
+        ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote)

You should really use defer() to register the "undo" actions individually. Something like:

ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote) defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote) ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote) defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote) ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote) defer(ethtool, f"-X {cfg.ifname} default", host=cfg.remote)
...

Quoted 1 line

This patch is fine. But could you follow up and convert the test fully?

I'll send a follow up, one to switch to defer(), then another to call tcp-data-split on.

maintainer
#3 lore raw
Quoted 11 lines · On Wed, 9 Apr 2025 19:06:13 -0700 David Wei wrote:
Quoted 11 lines

You should really use defer() to register the "undo" actions individually. Something like:

ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote) defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote) ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote) defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote) ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote) defer(ethtool, f"-X {cfg.ifname} default", host=cfg.remote)
...

Quoted 4 lines
Quoted 1 line

This patch is fine. But could you follow up and convert the test fully?

I'll send a follow up, one to switch to defer(), then another to call tcp-data-split on.

Thinking again this should go to net, rather than net-next. I'll apply it now, but just letting you know that the follow up needs to wait a week for trees to converge.

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

Hello:

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

Quoted 9 lines · On Wed, 9 Apr 2025 09:31:53 -0700 you wrote:

For bnxt when the agg ring is used then tcp-data-split is automatically reported to be enabled, but __net_mp_open_rxq() requires tcp-data-split to be explicitly enabled by the user.

Enable tcp-data-split explicitly in io_uring zc rx selftest.

[...]

Here is the summary with links:
- [net-next] io_uring/zcrx: enable tcp-data-split in selftest

    https://git.kernel.org/netdev/net/c/6afd0a3c7ecb

You are awesome, thank you!

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