From b7fb14dff027391000b319cf7279c36952f9465e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= Date: Fri, 25 Sep 2026 12:44:12 +0200 Subject: [PATCH] selftests: drv-net: Request larger zcrx buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The large-chunk test always requests two base pages. On interfaces with a large MTU, that may not exceed two maximum-sized frames. Request a power-of-two buffer larger than twice the MTU. This makes the existing rx_buf_len check and data-integrity traffic exercise the larger layout. Signed-off-by: Björn Töpel Tested-by: Breno Leitao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260925104417.2325213-6-bjorn@kernel.org Signed-off-by: Jakub Kicinski --- tools/testing/selftests/drivers/net/hw/iou-zcrx.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py index c833535d8a03..5047fdb56005 100755 --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.py +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.py @@ -221,9 +221,13 @@ def test_zcrx_large_chunks(cfg) -> None: single(cfg) page_size = resource.getpagesize() + mtu = cfg.dev["mtu"] nr_pages = 2 + while nr_pages * page_size <= 2 * mtu: + nr_pages *= 2 rx_buf_len = nr_pages * page_size - rx_cmd = f"{cfg.bin_local} -s -p {cfg.port} -i {cfg.ifname} -q {cfg.target} -x {nr_pages}" + rx_cmd = (f"{cfg.bin_local} -s -p {cfg.port} -i {cfg.ifname} " + f"-q {cfg.target} -x {nr_pages}") tx_cmd = f"{cfg.bin_remote} -c -h {cfg.addr_v['6']} -p {cfg.port} -l 12840" probe = cmd(rx_cmd + " -d", fail=False)