* [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest
@ 2025-04-09 16:31 David Wei
2025-04-10 0:06 ` Jakub Kicinski
2025-04-11 0:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: David Wei @ 2025-04-09 16:31 UTC (permalink / raw)
To: netdev
Cc: Andrew Lunn, Jakub Kicinski, Paolo Abeni, David S. Miller,
Eric Dumazet
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.
Signed-off-by: David Wei <dw@davidwei.uk>
---
tools/testing/selftests/drivers/net/hw/iou-zcrx.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
index 9f271ab6ec04..6a0378e06cab 100755
--- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
+++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
@@ -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:
--
2.47.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest
2025-04-09 16:31 [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest David Wei
@ 2025-04-10 0:06 ` Jakub Kicinski
2025-04-10 2:06 ` David Wei
2025-04-11 0:40 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2025-04-10 0:06 UTC (permalink / raw)
To: David Wei; +Cc: netdev, Andrew Lunn, Paolo Abeni, David S. Miller, Eric Dumazet
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.
> diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
> index 9f271ab6ec04..6a0378e06cab 100755
> --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
> +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
> @@ -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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest
2025-04-10 0:06 ` Jakub Kicinski
@ 2025-04-10 2:06 ` David Wei
2025-04-11 0:28 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: David Wei @ 2025-04-10 2:06 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, Andrew Lunn, Paolo Abeni, David S. Miller, Eric Dumazet
On 2025-04-09 17:06, Jakub Kicinski wrote:
> 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.
>
>> diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
>> index 9f271ab6ec04..6a0378e06cab 100755
>> --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
>> +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py
>> @@ -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?
I'll send a follow up, one to switch to defer(), then another to call
tcp-data-split on.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest
2025-04-10 2:06 ` David Wei
@ 2025-04-11 0:28 ` Jakub Kicinski
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2025-04-11 0:28 UTC (permalink / raw)
To: David Wei; +Cc: netdev, Andrew Lunn, Paolo Abeni, David S. Miller, Eric Dumazet
On Wed, 9 Apr 2025 19:06:13 -0700 David Wei wrote:
> > 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?
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest
2025-04-09 16:31 [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest David Wei
2025-04-10 0:06 ` Jakub Kicinski
@ 2025-04-11 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-11 0:40 UTC (permalink / raw)
To: David Wei; +Cc: netdev, andrew+netdev, kuba, pabeni, davem, edumazet
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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.
>
> Signed-off-by: David Wei <dw@davidwei.uk>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-11 0:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 16:31 [PATCH net-next] io_uring/zcrx: enable tcp-data-split in selftest David Wei
2025-04-10 0:06 ` Jakub Kicinski
2025-04-10 2:06 ` David Wei
2025-04-11 0:28 ` Jakub Kicinski
2025-04-11 0:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).