Skip to content

seltests/xsk: various improvements to xskxceiver

Magnus Karlsson bpf netdev 4 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 1 replyApplied 10/10
  2. v310 patches 5 repliesSuperseded
  3. v211 patches 13 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches11 repliesSuperseded

Changes in v4 from the cover letter

* Fixed another spelling error in patch #9 [Maciej]
* Only allow the actual strings for the -m command [Maciej]
* Move some code from patch #7 to #3 [Maciej]

Patches in v4 All 10 applied

#Subject and filesSizeRepliesApplied
1/10selftests/xsk: print per packet info in verbose modetools/testing/selftests/bpf/xskxceiver.c+10 -30 repliesApplied
2/10selftests/xsk: add timeout for Tx threadtools/testing/selftests/bpf/xskxceiver.c+22 -40 repliesApplied
3/10selftests/xsk: add option to only run tests in a single modetools/testing/selftests/bpf/test_xsk.sh tools/testing/selftests/bpf/xskxceiver.c tools/testing/selftests/bpf/xskxceiver.h+47 -80 repliesApplied
4/10selftests/xsk: move all tests to separate functionstools/testing/selftests/bpf/xskxceiver.c+115 -550 repliesApplied
5/10selftests/xsk: declare test names in structtools/testing/selftests/bpf/xskxceiver.c tools/testing/selftests/bpf/xskxceiver.h+57 -1710 repliesApplied
6/10selftests/xsk: add option that lists all teststools/testing/selftests/bpf/test_xsk.sh tools/testing/selftests/bpf/xsk_prereqs.sh tools/testing/selftests/bpf/xskxceiver.c+42 -70 repliesApplied
7/10selftests/xsk: add option to run single testtools/testing/selftests/bpf/test_xsk.sh tools/testing/selftests/bpf/xskxceiver.c tools/testing/selftests/bpf/xskxceiver.h+48 -210 repliesApplied
8/10selftests/xsk: use ksft_print_msg uniformlytools/testing/selftests/bpf/xskxceiver.c+13 -120 repliesApplied
9/10selftests/xsk: fail single test instead of all teststools/testing/selftests/bpf/xskxceiver.c+46 -240 repliesApplied
10/10selftests/xsk: display command line options with -htools/testing/selftests/bpf/test_xsk.sh tools/testing/selftests/bpf/xskxceiver.c+14 -20 repliesApplied

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMaciej Fijalkowski
SeriesA-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH bpf-next v4 00/10] seltests/xsk: various improvements to xskxceiver

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

v3 -> v4:
* Fixed another spelling error in patch #9 [Maciej]
* Only allow the actual strings for the -m command [Maciej]
* Move some code from patch #7 to #3 [Maciej]

v2 -> v3:
* Drop the support for environment variables. Probably not useful. [Maciej]
* Fixed spelling mistake in patch #9 [Maciej]
* Fail gracefully if unsupported mode is chosen [Maciej]
* Simplified test run loop [Maciej]

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 (10):
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

 tools/testing/selftests/bpf/test_xsk.sh    |  40 +-
 tools/testing/selftests/bpf/xsk_prereqs.sh |  10 +-
 tools/testing/selftests/bpf/xskxceiver.c   | 535 ++++++++++++---------
 tools/testing/selftests/bpf/xskxceiver.h   |  44 +-
 4 files changed, 368 insertions(+), 261 deletions(-)

base-commit: 558c50cc3b135e00c9ed15df4c9159e84166f94c --
2.42.0