[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230412162114.19389-4-kal.conley@dectris.com>
Date: Wed, 12 Apr 2023 18:21:13 +0200
From: Kal Conley <kal.conley@...tris.com>
To: Magnus Karlsson <magnus.karlsson@...el.com>,
Björn Töpel <bjorn@...nel.org>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Mykola Lysenko <mykolal@...com>, Shuah Khan <shuah@...nel.org>
Cc: Kal Conley <kal.conley@...tris.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH bpf-next v6 3/4] selftests: xsk: Use hugepages when umem->frame_size > PAGE_SIZE
HugeTLB UMEMs now support chunk_size > PAGE_SIZE. Set MAP_HUGETLB when
frame_size > PAGE_SIZE for future tests.
Signed-off-by: Kal Conley <kal.conley@...tris.com>
Acked-by: Magnus Karlsson <magnus.karlsson@...el.com>
---
tools/testing/selftests/bpf/xskxceiver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c
index 5a9691e942de..7eccf57a0ccc 100644
--- a/tools/testing/selftests/bpf/xskxceiver.c
+++ b/tools/testing/selftests/bpf/xskxceiver.c
@@ -1289,7 +1289,7 @@ static void thread_common_ops(struct test_spec *test, struct ifobject *ifobject)
void *bufs;
int ret;
- if (ifobject->umem->unaligned_mode)
+ if (ifobject->umem->frame_size > sysconf(_SC_PAGESIZE) || ifobject->umem->unaligned_mode)
mmap_flags |= MAP_HUGETLB;
if (ifobject->shared_umem)
--
2.39.2
Powered by blists - more mailing lists