[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJqHvt0EsV6ALgiE@MacBook-Air.local>
Date: Mon, 11 Aug 2025 17:15:58 -0700
From: Joe Damato <joe@...a.to>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
shuah@...nel.org, sdf@...ichev.me, almasrymina@...gle.com,
noren@...dia.com, linux-kselftest@...r.kernel.org,
ap420073@...il.com
Subject: Re: [PATCH net-next 5/5] selftests: drv-net: devmem: flip the
direction of Tx tests
On Mon, Aug 11, 2025 at 04:13:34PM -0700, Jakub Kicinski wrote:
> The Device Under Test should always be the local system.
> While the Rx test gets this right the Tx test is sending
> from remote to local. So Tx of DMABUF memory happens on remote.
>
> These tests never run in NIPA since we don't have a compatible
> device so we haven't caught this.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> tools/testing/selftests/drivers/net/hw/devmem.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testing/selftests/drivers/net/hw/devmem.py
> index 0a2533a3d6d6..45c2d49d55b6 100755
> --- a/tools/testing/selftests/drivers/net/hw/devmem.py
> +++ b/tools/testing/selftests/drivers/net/hw/devmem.py
> @@ -42,9 +42,9 @@ from lib.py import ksft_disruptive
> port = rand_port()
> listen_cmd = f"socat -U - TCP{cfg.addr_ipver}-LISTEN:{port}"
>
> - with bkg(listen_cmd) as socat:
> - wait_port_listen(port)
> - cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_remote} -f {cfg.ifname} -s {cfg.addr} -p {port}", host=cfg.remote, shell=True)
> + with bkg(listen_cmd, host=cfg.remote, exit_wait=True) as socat:
> + wait_port_listen(port, host=cfg.remote)
> + cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_local} -f {cfg.ifname} -s {cfg.remote_addr} -p {port}", shell=True)
>
> ksft_eq(socat.stdout.strip(), "hello\nworld")
>
> @@ -56,9 +56,9 @@ from lib.py import ksft_disruptive
> port = rand_port()
> listen_cmd = f"socat -U - TCP{cfg.addr_ipver}-LISTEN:{port}"
>
> - with bkg(listen_cmd, exit_wait=True) as socat:
> - wait_port_listen(port)
> - cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_remote} -f {cfg.ifname} -s {cfg.addr} -p {port} -z 3", host=cfg.remote, shell=True)
> + with bkg(listen_cmd, host=cfg.remote, exit_wait=True) as socat:
> + wait_port_listen(port, host=cfg.remote)
> + cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_local} -f {cfg.ifname} -s {cfg.remote_addr} -p {port} -z 3", shell=True)
>
> ksft_eq(socat.stdout.strip(), "hello\nworld")
FWIW: I don't have one of these devices to test this on, but the change seems
reasonable to me, so:
Reviewed-by: Joe Damato <joe@...a.to>
Powered by blists - more mailing lists