Skip to content

selftests: net: page_poll allocation error injection

Jakub Kicinski linux-kselftest netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesApplied 6/6
  2. v16 patches 12 repliesSuperseded

Changes in v2 from the cover letter

- fix the string formatting for tool wrapper change (patch 3)
- fix import order for load.py
v1: https://lore.kernel.org/all/[email protected]/

Patches in v2 All 6 applied

#Subject and filesSizeRepliesApplied
1/6net: page_pool: support error injectionnet/core/page_pool.c+2 -00 repliesApplied
2/6selftests: drv-net-hw: support using Python from net hw teststools/testing/selftests/Makefile tools/testing/selftests/drivers/net/hw/Makefile tools/testing/selftests/drivers/net/hw/lib/py/__init__.py +1 more+26 -30 repliesApplied
3/6selftests: net: py: extract tool logictools/testing/selftests/net/lib/py/utils.py+9 -30 repliesApplied
4/6selftests: net: py: avoid all ports < 10ktools/testing/selftests/net/lib/py/utils.py+1 -10 repliesApplied
5/6selftests: drv-net: support generating iperf3 loadtools/testing/selftests/drivers/net/lib/py/__init__.py tools/testing/selftests/drivers/net/lib/py/load.py+42 -00 repliesApplied
6/6selftests: drv-net-hw: add test for memory allocation failures with page pooltools/testing/selftests/drivers/net/hw/Makefile tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py tools/testing/selftests/net/lib/py/ksft.py+134 -00 repliesApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchWillem de Bruijn
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

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

Read the v2 thread

Cover letter [PATCH net-next v2 0/6] selftests: net: page_poll allocation error injection

Add a test for exercising driver memory allocation failure paths. page pool is a bit tricky to inject errors into at the page allocator level because of the bulk alloc and recycling, so add explicit error injection support "in front" of the caches.

Add a test to exercise that using only the standard APIs. This is the first useful test for the new tests with an endpoint. There's no point testing netdevsim here, so this is also the first HW-only test in Python.

I'm not super happy with the traffic generation using iperf3, my initial approach was to use mausezahn. But it turned out to be 5x slower in terms of PPS. Hopefully this is good enough for now.

v2:
- fix the string formatting for tool wrapper change (patch 3)
- fix import order for load.py
v1: https://lore.kernel.org/all/[email protected]/

Jakub Kicinski (6):
net: page_pool: support error injection
selftests: drv-net-hw: support using Python from net hw tests
selftests: net: py: extract tool logic
selftests: net: py: avoid all ports < 10k
selftests: drv-net: support generating iperf3 load
selftests: drv-net-hw: add test for memory allocation failures with
page pool

 net/core/page_pool.c                          |   2 +
 tools/testing/selftests/Makefile              |   2 +-
 .../testing/selftests/drivers/net/hw/Makefile |   2 +
 .../drivers/net/hw/lib/py/__init__.py         |  16 +++
 .../selftests/drivers/net/hw/pp_alloc_fail.py | 129 ++++++++++++++++++
 .../selftests/drivers/net/lib/py/__init__.py  |   1 +
 .../selftests/drivers/net/lib/py/env.py       |  10 +-
 .../selftests/drivers/net/lib/py/load.py      |  41 ++++++
 tools/testing/selftests/net/lib/py/ksft.py    |   4 +
 tools/testing/selftests/net/lib/py/utils.py   |  14 +-
 10 files changed, 214 insertions(+), 7 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/hw/lib/py/__init__.py
 create mode 100755 tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py
 create mode 100644 tools/testing/selftests/drivers/net/lib/py/load.py
Signature · 1 line
2.44.0