selftests: xsk: Add test UNALIGNED_INV_DESC_4K1_FRAME_SIZE
authorKal Conley <kal.conley@dectris.com>
Wed, 5 Apr 2023 23:59:19 +0000 (01:59 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 6 Apr 2023 17:50:45 +0000 (10:50 -0700)
commitc0801598e5430d9da2d406ed32fcedbef23977fc
treef2426e9737eb44ca8f058f99a9b250536e577da0
parentd769ccaf957fe7391f357c0a923de71f594b8a2b
selftests: xsk: Add test UNALIGNED_INV_DESC_4K1_FRAME_SIZE

Add unaligned descriptor test for frame size of 4001. Using an odd frame
size ensures that the end of the UMEM is not near a page boundary. This
allows testing descriptors that staddle the end of the UMEM but not a
page.

This test used to fail without the previous commit ("xsk: Fix unaligned
descriptor validation").

Signed-off-by: Kal Conley <kal.conley@dectris.com>
Link: https://lore.kernel.org/r/20230405235920.7305-3-kal.conley@dectris.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h