]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: iou-zcrx: Get the page size at runtime
authorHaiyue Wang <haiyuewa@163.com>
Sat, 19 Apr 2025 14:10:15 +0000 (22:10 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 24 Apr 2025 23:29:47 +0000 (16:29 -0700)
commitdf8cf32413fa487313eb799f28f87a543480cfa0
treeb02e7e7da6de122e34967c472882f0840a9f2f64
parent5565acd1e6c4a1994e0ba32281ec10b69c0be14d
selftests: iou-zcrx: Get the page size at runtime

Use the API `sysconf()` to query page size at runtime, instead of using
hard code number 4096.

And use `posix_memalign` to allocate the page size aligned momory.

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: David Wei <dw@davidwei.uk>
Link: https://patch.msgid.link/20250419141044.10304-1-haiyuewa@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/hw/iou-zcrx.c