]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: xsk: Generate packets from specification
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 25 Aug 2021 09:37:20 +0000 (11:37 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 25 Aug 2021 19:23:11 +0000 (12:23 -0700)
commitfa8ed2abfcac8049dea8ebb767dae8c8ac50606d
tree8a943d490c3ac155663999c1942592c1c20d15c1
parentd6168cca096df7b3040ea7ba4c55f8a270e8117c
selftests: xsk: Generate packets from specification

Generate packets from a specification instead of something hard
coded. The idea is that a test generates one or more packet
specifications and provides it/them to both Tx and Rx. The Tx thread
will generate from this specification and Rx will validate that it
receives what is in the specification. The specification can be the
same on both ends, meaning that everything that was sent should be
received, or different which means that Rx will only receive part of
the sent packets.

Currently, the packet specification is the same for both Rx and Tx and
the same for each test. This will change in later work as features
and tests are added.

The data path functions are also renamed to better reflect what
actions they are performing after introducing this feature.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-15-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h