OSDN Git Service

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)
commit29f128b38b346a16dc6749b66f20fca29430d271
tree8a943d490c3ac155663999c1942592c1c20d15c1
parent960b6e0153fb383bd634313fbd41bd4813dd73fc
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