selftests: drv-net: add HDS payload sweep test for devmem TCP
authorBobby Eshleman <bobbyeshleman@meta.com>
Thu, 12 Feb 2026 01:00:44 +0000 (17:00 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Feb 2026 09:40:14 +0000 (10:40 +0100)
commite7a3c1adc127f9f91a35169d34f7471d417d72a6
treeb0a77d6b53b482a5efa56d3759aadb237bd7e822
parent0f30a31b55c4179fc55613a75ef41d496687d465
selftests: drv-net: add HDS payload sweep test for devmem TCP

Add check_rx_hds test that verifies header/data split works across
payload sizes. The test sweeps payload sizes from 1 byte to 8KB, if any
data propagates up to userspace as SCM_DEVMEM_LINEAR, then the test
fails. This shows that regardless of payload size, ncdevmem's
configuration of hds-thresh to 0 is respected.

Add -L (--fail-on-linear) flag to ncdevmem that causes the receiver to
fail if any SCM_DEVMEM_LINEAR cmsg is received.

Use socat option for fixed block sizing and tcp nodelay to disable
nagle's algo to avoid buffering.

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
Link: https://patch.msgid.link/20260211-fbnic-tcp-hds-fixes-v1-4-55d050e6f606@meta.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/drivers/net/hw/devmem.py
tools/testing/selftests/drivers/net/hw/ncdevmem.c