netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 00/11] seltests/xsk: various improvements to xskxceiver
@ 2023-08-24 12:28 Magnus Karlsson
  2023-08-24 12:28 ` [PATCH bpf-next v2 01/11] selftests/xsk: print per packet info in verbose mode Magnus Karlsson
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Magnus Karlsson @ 2023-08-24 12:28 UTC (permalink / raw)
  To: magnus.karlsson, bjorn, ast, daniel, netdev, maciej.fijalkowski,
	bpf, yhs, andrii, martin.lau, song, john.fastabend, kpsingh, sdf,
	haoluo, jolsa, przemyslaw.kitszel
  Cc: Magnus Karlsson

This patch set implements several improvements to the xsk selftests
test suite that I thought were useful while debugging the xsk
multi-buffer code and tests. The largest new feature is the ability to
be able to execute a single test instead of the whole test suite. This
required some surgery on the current code, details below.

Anatomy of the path set:

1: Print useful info on a per packet basis with the option -v

2: Add a timeout in the transmission loop too. We only used to have
   one for the Rx thread, but Tx can lock up too waiting for
   completions.

3: Add an option (-m) to only run the tests (or a single test with a
   later patch) in a single mode: skb, drv, or zc (zero-copy).

4-5: Preparatory patches to be able to specify a test to run. Need to
     define the test names in a single structure and their entry
     points, so we can use this when wanting to run a specific test.

6: Adds a command line option (-l) that lists all the tests.

7: Adds a command line option (-t) that runs a specific test instead
   of the whole test suite. Can be combined with -m to specify a
   single mode too.

8: Use ksft_print_msg() uniformly throughout the tests. It was a mix
   of printf() and ksft_print_msg() before.

9: In some places, we failed the whole test suite instead of a single
   test in certain circumstances. Fix this so only the test in
   question is failed and the rest of the test suite continues.

10: Display the available command line options with -h

11: Introduce the environment variable XSKTEST_ETH to be able to set
    the network interface to be used.

v1 -> v2:

* Introduce XSKTEST_MODE env variable to be able to set the mode to
  use [Przemyslaw]
* Introduce XSKTEST_ETH env variable to be able to set the ethernet
  interface to use by introducing a new patch (#11) [Magnus]
* Fixed spelling error in patch #5 [Przemyslaw, Maciej]
* Fixed confusing documentation in patch #10  [Przemyslaw]
* The -l option can now be used without being root [Magnus, Maciej]
* Fixed documentation error in patch #7 [Maciej]
* Added error handling to the -t option [Maciej]
* -h now displayed as an option [Maciej]

Thanks: Magnus

Magnus Karlsson (11):
  selftests/xsk: print per packet info in verbose mode
  selftests/xsk: add timeout for Tx thread
  selftests/xsk: add option to only run tests in a single mode
  selftests/xsk: move all tests to separate functions
  selftests/xsk: declare test names in struct
  selftests/xsk: add option that lists all tests
  selftests/xsk: add option to run single test
  selftests/xsk: use ksft_print_msg uniformly
  selftests/xsk: fail single test instead of all tests
  selftests/xsk: display command line options with -h
  selftests/xsk: introduce XSKTEST_ETH environment variable

 tools/testing/selftests/bpf/test_xsk.sh    |  60 ++-
 tools/testing/selftests/bpf/xsk_prereqs.sh |  10 +-
 tools/testing/selftests/bpf/xskxceiver.c   | 536 ++++++++++++---------
 tools/testing/selftests/bpf/xskxceiver.h   |  44 +-
 4 files changed, 377 insertions(+), 273 deletions(-)


base-commit: f3bdb54f09ab4cdbca48bf7befa8997cadd8d6a1
--
2.34.1

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-08-25 13:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 12:28 [PATCH bpf-next v2 00/11] seltests/xsk: various improvements to xskxceiver Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 01/11] selftests/xsk: print per packet info in verbose mode Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 02/11] selftests/xsk: add timeout for Tx thread Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 03/11] selftests/xsk: add option to only run tests in a single mode Magnus Karlsson
2023-08-25 12:02   ` Maciej Fijalkowski
2023-08-25 12:30     ` Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 04/11] selftests/xsk: move all tests to separate functions Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 05/11] selftests/xsk: declare test names in struct Magnus Karlsson
2023-08-25 12:06   ` Maciej Fijalkowski
2023-08-24 12:28 ` [PATCH bpf-next v2 06/11] selftests/xsk: add option that lists all tests Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 07/11] selftests/xsk: add option to run single test Magnus Karlsson
2023-08-25 12:44   ` Maciej Fijalkowski
2023-08-25 12:50     ` Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 08/11] selftests/xsk: use ksft_print_msg uniformly Magnus Karlsson
2023-08-24 12:28 ` [PATCH bpf-next v2 09/11] selftests/xsk: fail single test instead of all tests Magnus Karlsson
2023-08-25 12:48   ` Maciej Fijalkowski
2023-08-24 12:28 ` [PATCH bpf-next v2 10/11] selftests/xsk: display command line options with -h Magnus Karlsson
2023-08-25 12:49   ` Maciej Fijalkowski
2023-08-25 12:54     ` Magnus Karlsson
2023-08-25 13:06       ` Maciej Fijalkowski
2023-08-24 12:28 ` [PATCH bpf-next v2 11/11] selftests/xsk: introduce XSKTEST_ETH environment variable Magnus Karlsson
2023-08-25 12:57   ` Maciej Fijalkowski
2023-08-25 13:03     ` Magnus Karlsson
2023-08-25 13:19       ` Maciej Fijalkowski
2023-08-25 13:34         ` Magnus Karlsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).