mbox series

[net-next,v2,0/6] selftests: net: page_poll allocation error injection

Message ID 20240429144426.743476-1-kuba@kernel.org (mailing list archive)
Headers show
Series selftests: net: page_poll allocation error injection | expand

Message

Jakub Kicinski April 29, 2024, 2:44 p.m. UTC
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/20240426232400.624864-1-kuba@kernel.org/

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

Comments

patchwork-bot+netdevbpf@kernel.org April 30, 2024, 3:20 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 29 Apr 2024 07:44:20 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/6] net: page_pool: support error injection
    https://git.kernel.org/netdev/net-next/c/12b6c3a0380a
  - [net-next,v2,2/6] selftests: drv-net-hw: support using Python from net hw tests
    https://git.kernel.org/netdev/net-next/c/ff4b2bfa63bd
  - [net-next,v2,3/6] selftests: net: py: extract tool logic
    https://git.kernel.org/netdev/net-next/c/32a4ca1361d7
  - [net-next,v2,4/6] selftests: net: py: avoid all ports < 10k
    https://git.kernel.org/netdev/net-next/c/ee2512d6bf41
  - [net-next,v2,5/6] selftests: drv-net: support generating iperf3 load
    https://git.kernel.org/netdev/net-next/c/0f0cdf312ecc
  - [net-next,v2,6/6] selftests: drv-net-hw: add test for memory allocation failures with page pool
    https://git.kernel.org/netdev/net-next/c/9da271f825e4

You are awesome, thank you!