]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: xsk: Add tests for invalid xsk descriptors
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 7 Sep 2021 07:19:27 +0000 (09:19 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 10 Sep 2021 19:15:32 +0000 (21:15 +0200)
commit4dbcdf9ed26e92f0f87f3ddb0b5c11e650a52a89
treead9bd2240d1b9a0ec9ceea3184728c922a6862d4
parent6c5f1a2fe47cb26d12916a8a3ab84edaaf292c72
selftests: xsk: Add tests for invalid xsk descriptors

Add tests for invalid xsk descriptors in the Tx ring. A number of
handcrafted nasty invalid descriptors are created and submitted to the
tx ring to check that they are validated correctly. Corner case valid
ones are also sent. The tests are run for both aligned and unaligned
mode.

pkt_stream_set() is introduced to be able to create a hand-crafted
packet stream where every single packet is specified in detail.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20210907071928.9750-20-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h