[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ8uoz3F-gWzB9vYm-8MtonAv3aBcerJDxPpEDCNfmNkwJFY=A@mail.gmail.com>
Date: Tue, 21 Mar 2023 09:45:45 +0100
From: Magnus Karlsson <magnus.karlsson@...il.com>
To: Kal Conley <kal.conley@...tris.com>
Cc: Björn Töpel <bjorn@...nel.org>,
Magnus Karlsson <magnus.karlsson@...el.com>,
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>,
netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next 3/3] selftests: xsk: Add tests for 8K and 9K
frame sizes
On Sun, 19 Mar 2023 at 21:07, Kal Conley <kal.conley@...tris.com> wrote:
>
> Add tests:
> - RUN_TO_COMPLETION_8K_FRAME_SIZE: frame_size=8192 (aligned)
> - RUN_TO_COMPLETION_9K_FRAME_SIZE: frame_size=9000 (unaligned)
>
> Signed-off-by: Kal Conley <kal.conley@...tris.com>
> ---
> tools/testing/selftests/bpf/xskxceiver.c | 24 ++++++++++++++++++++++++
> tools/testing/selftests/bpf/xskxceiver.h | 2 ++
> 2 files changed, 26 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c
> index 7a47ef28fbce..f10ff8c5e9c5 100644
> --- a/tools/testing/selftests/bpf/xskxceiver.c
> +++ b/tools/testing/selftests/bpf/xskxceiver.c
> @@ -1789,6 +1789,30 @@ static void run_pkt_test(struct test_spec *test, enum test_mode mode, enum test_
> pkt_stream_replace(test, DEFAULT_PKT_CNT, PKT_SIZE);
> testapp_validate_traffic(test);
> break;
> + case TEST_TYPE_RUN_TO_COMPLETION_8K_FRAME:
> + if (!hugepages_present(test->ifobj_tx)) {
> + ksft_test_result_skip("No 2M huge pages present.\n");
> + return;
> + }
> + test_spec_set_name(test, "RUN_TO_COMPLETION_8K_FRAME_SIZE");
> + test->ifobj_tx->umem->frame_size = 8192;
> + test->ifobj_rx->umem->frame_size = 8192;
> + pkt_stream_replace(test, DEFAULT_PKT_CNT, PKT_SIZE);
> + testapp_validate_traffic(test);
> + break;
> + case TEST_TYPE_RUN_TO_COMPLETION_9K_FRAME:
TEST_TYPE_UNALIGNED_9K_FRAME
> + if (!hugepages_present(test->ifobj_tx)) {
> + ksft_test_result_skip("No 2M huge pages present.\n");
> + return;
> + }
> + test_spec_set_name(test, "RUN_TO_COMPLETION_9K_FRAME_SIZE");
UNALIGNED_MODE_9K
> + test->ifobj_tx->umem->frame_size = 9000;
> + test->ifobj_rx->umem->frame_size = 9000;
> + test->ifobj_tx->umem->unaligned_mode = true;
> + test->ifobj_rx->umem->unaligned_mode = true;
> + pkt_stream_replace(test, DEFAULT_PKT_CNT, PKT_SIZE);
> + testapp_validate_traffic(test);
> + break;
> case TEST_TYPE_RX_POLL:
> test->ifobj_rx->use_poll = true;
> test_spec_set_name(test, "POLL_RX");
> diff --git a/tools/testing/selftests/bpf/xskxceiver.h b/tools/testing/selftests/bpf/xskxceiver.h
> index 3e8ec7d8ec32..ff723b6d7852 100644
> --- a/tools/testing/selftests/bpf/xskxceiver.h
> +++ b/tools/testing/selftests/bpf/xskxceiver.h
> @@ -70,6 +70,8 @@ enum test_mode {
> enum test_type {
> TEST_TYPE_RUN_TO_COMPLETION,
> TEST_TYPE_RUN_TO_COMPLETION_2K_FRAME,
> + TEST_TYPE_RUN_TO_COMPLETION_8K_FRAME,
> + TEST_TYPE_RUN_TO_COMPLETION_9K_FRAME,
> TEST_TYPE_RUN_TO_COMPLETION_SINGLE_PKT,
> TEST_TYPE_RX_POLL,
> TEST_TYPE_TX_POLL,
> --
> 2.39.2
>
Powered by blists - more mailing lists