Re: [PATCH bpf-next 3/3] selftests: xsk: Add tests for 8K and 9K frame sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Mar 2023 at 09:45, Magnus Karlsson <magnus.karlsson@xxxxxxxxx> wrote:
>
> On Sun, 19 Mar 2023 at 21:07, Kal Conley <kal.conley@xxxxxxxxxxx> 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@xxxxxxxxxxx>
> > ---
> >  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

_9K_FRAME_SIZE it should have been. Hit send too early.

> > +               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
> >



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux