Re: [PATCH net-next v3 3/4] selftests/net: ncdevmem: add -b option to set rx-buf-size on bind

From
Stanislav Fomichev <hidden>
Date
2026-06-13 02:04:00
Also in
dri-devel, linux-kselftest, linux-media, lkml
Reply to
Bobby Eshleman, 2026-06-12
On 06/12, Bobby Eshleman wrote:
From: Bobby Eshleman <bobbyeshleman@meta.com>

Add -b <bytes> to request a non-default niov size via
NETDEV_A_DMABUF_RX_BUF_SIZE. When the value exceeds PAGE_SIZE,
udmabuf_alloc() switches to an MFD_HUGETLB-backed memfd so each 2 MB
hugepage produces one naturally-aligned sg entry.

Reject values > 2 MB up front: MFD_HUGETLB + udmabuf can only guarantee
2 MB per sg entry (one hugepage), so a larger rx_buf_size would fail the
per-sg length/alignment check.

Add CONFIG_HUGETLBFS=y to drivers/net/hw/config so the new path is
reachable in the CI kernels built for these tests.

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Thread (9 messages) 9 messages, 4 authors, last reply 2026-06-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help