From fbb894b2d447f088b13b69f18837ee53452422ab Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 11 Aug 2022 10:55:17 +0200 Subject: [PATCH] tests: (mkfds) use getpagesize() Signed-off-by: Karel Zak --- tests/helpers/test_mkfds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index e0a7ea8677..bc3f569391 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -621,8 +621,8 @@ static void make_mmapped_packet_socket(const struct factory *factory, struct fde * - linux/Documentation/networking/packet_mmap.rst * - https://sites.google.com/site/packetmmap/home */ - req.tp_block_size = PAGE_SIZE; - req.tp_frame_size = PAGE_SIZE; + req.tp_block_size = getpagesize(); + req.tp_frame_size = getpagesize(); req.tp_block_nr = 1; req.tp_frame_nr = 1; if (setsockopt(sd, SOL_PACKET, PACKET_TX_RING, (char *)&req, sizeof(req)) < 0) { -- 2.47.3