diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2021-09-07 09:19:24 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-09-10 21:15:31 +0200 |
commit | 605091c5100ddc1ae0d67a74b688d8755658d3c9 (patch) | |
tree | 3be2ec3cdff221c2a629729842052b96ed5407ea /tools/testing/selftests/bpf/xdpxceiver.h | |
parent | 8abf6f725a9e50cf8e8bd44edb2a577d98f0d775 (diff) |
selftests: xsk: Introduce replacing the default packet stream
Introduce the concept of a default packet stream that is the set of
packets sent by most tests. Then add the ability to replace it for a
test that would like to send or receive something else through the use
of the function pkt_stream_replace() and then restored with
pkt_stream_restore_default(). These are then used to convert the
STAT_TEST_TX_INVALID to use these new APIs.
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-17-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.h')
-rw-r--r-- | tools/testing/selftests/bpf/xdpxceiver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.h b/tools/testing/selftests/bpf/xdpxceiver.h index c5baa7c5f560..e27fe348ae50 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.h +++ b/tools/testing/selftests/bpf/xdpxceiver.h @@ -132,6 +132,7 @@ struct ifobject { struct test_spec { struct ifobject *ifobj_tx; struct ifobject *ifobj_rx; + struct pkt_stream *pkt_stream_default; u16 total_steps; u16 current_step; u16 nb_sockets; |