From: Yonghong Song <yonghong.song@linux.dev>
To: Amery Hung <ameryhung@gmail.com>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
kernel-team@fb.com, Martin KaFai Lau <martin.lau@kernel.org>,
Alan Maguire <alan.maguire@oracle.com>
Subject: Re: [PATCH bpf-next v2 2/2] selftests/bpf: Fix xdp_pull_data failure with 64K page
Date: Thu, 22 Jan 2026 13:38:07 -0800 [thread overview]
Message-ID: <d30fce68-01d9-44ef-bb28-28b6d2bdb13d@linux.dev> (raw)
In-Reply-To: <CAMB2axP_AaoiZB9BSQ3Mz_M0e0t1S-y3u8KnBx1FY1nCq3qN6Q@mail.gmail.com>
On 1/22/26 1:18 PM, Amery Hung wrote:
> On Thu, Jan 22, 2026 at 8:56 AM Yonghong Song <yonghong.song@linux.dev> wrote:
>> If the argument 'pull_len' of run_test() is 'PULL_MAX' or
>> 'PULL_MAX | PULL_PLUS_ONE', the eventual pull_len size
>> will close to the page size. On arm64 systems with 64K pages,
>> the pull_len size will be close to 64K. But the existing buffer
>> will be close to 9000 which is not enough to pull.
>>
>> For those failed run_tests(), make buff size to
>> 2 * pg_sz + (pg_sz / 2)
>> This way, there will be enough buffer space to pull
>> regardless of page size.
>>
>> Tested-by: Alan Maguire <alan.maguire@oracle.com>
>> Cc: Amery Hung <ameryhung@gmail.com>
>> Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
>> ---
>> .../testing/selftests/bpf/prog_tests/xdp_pull_data.c | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> Changelog:
>> v1 -> v2:
>> - v1: https://lore.kernel.org/bpf/20260120210930.2544950-1-yonghong.song@linux.dev/
>> - Use pg_sz to simplify buff_len calculation.
>>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_pull_data.c b/tools/testing/selftests/bpf/prog_tests/xdp_pull_data.c
>> index efa350d04ec5..35f0eb5b43f3 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/xdp_pull_data.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/xdp_pull_data.c
>> @@ -114,12 +114,14 @@ static void test_xdp_pull_data_basic(void)
>> {
>> u32 pg_sz, max_meta_len, max_data_len;
>> struct test_xdp_pull_data *skel;
>> + int buff_len;
>>
>> skel = test_xdp_pull_data__open_and_load();
>> if (!ASSERT_OK_PTR(skel, "test_xdp_pull_data__open_and_load"))
>> return;
>>
>> pg_sz = sysconf(_SC_PAGE_SIZE);
>> + buff_len = 2 * pg_sz + pg_sz / 2;
> Thanks for fixing the test. Just curious if there is an issue with 1.5
> pg_sz as suggested by Alan?
Although existing 'buff_len = 2 * pg_sz + pg_sz / 2' works fine for the test,
but let us use the Alan's suggestion (buff_len = pg_sz + pg_sz / 2)
since the buffer size is tighter and potentially better for test.
>
>> if (find_xdp_sizes(skel, pg_sz))
>> goto out;
[...]
next prev parent reply other threads:[~2026-01-22 21:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 16:26 [PATCH bpf-next v2 1/2] selftests/bpf: Fix task_local_data failure with 64K page Yonghong Song
2026-01-22 16:26 ` [PATCH bpf-next v2 2/2] selftests/bpf: Fix xdp_pull_data " Yonghong Song
2026-01-22 21:18 ` Amery Hung
2026-01-22 21:28 ` Yonghong Song
2026-01-22 21:38 ` Yonghong Song [this message]
2026-01-22 21:53 ` Amery Hung
2026-01-22 21:49 ` [PATCH bpf-next v2 1/2] selftests/bpf: Fix task_local_data " Amery Hung
2026-01-22 22:58 ` Yonghong Song
2026-01-22 23:34 ` Alexei Starovoitov
2026-01-22 23:47 ` Amery Hung
2026-01-23 0:23 ` Yonghong Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d30fce68-01d9-44ef-bb28-28b6d2bdb13d@linux.dev \
--to=yonghong.song@linux.dev \
--cc=alan.maguire@oracle.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.