netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] selftests: net: page_poll allocation error injection
@ 2024-04-26 23:23 Jakub Kicinski
  2024-04-26 23:23 ` [PATCH net-next 1/6] net: page_pool: support " Jakub Kicinski
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Jakub Kicinski @ 2024-04-26 23:23 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, linux-kselftest, willemdebruijn.kernel,
	Jakub Kicinski

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.

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

-- 
2.44.0


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

end of thread, other threads:[~2024-04-30 15:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 23:23 [PATCH net-next 0/6] selftests: net: page_poll allocation error injection Jakub Kicinski
2024-04-26 23:23 ` [PATCH net-next 1/6] net: page_pool: support " Jakub Kicinski
2024-04-30 15:27   ` Jesper Dangaard Brouer
2024-04-26 23:23 ` [PATCH net-next 2/6] selftests: drv-net-hw: support using Python from net hw tests Jakub Kicinski
2024-04-26 23:23 ` [PATCH net-next 3/6] selftests: net: py: extract tool logic Jakub Kicinski
2024-04-27 13:51   ` Willem de Bruijn
2024-04-29 14:44     ` Jakub Kicinski
2024-04-26 23:23 ` [PATCH net-next 4/6] selftests: net: py: avoid all ports < 10k Jakub Kicinski
2024-04-26 23:23 ` [PATCH net-next 5/6] selftests: drv-net: support generating iperf3 load Jakub Kicinski
2024-04-26 23:23 ` [PATCH net-next 6/6] selftests: drv-net-hw: add test for memory allocation failures with page pool Jakub Kicinski
2024-04-27 13:49   ` Willem de Bruijn
2024-04-29 14:51     ` Jakub Kicinski
2024-04-29 15:02       ` Willem de Bruijn
2024-04-29 16:27         ` Jakub Kicinski
2024-04-29 15:12   ` Andrew Lunn
2024-04-29 16:16     ` Jakub Kicinski
2024-04-27 13:55 ` [PATCH net-next 0/6] selftests: net: page_poll allocation error injection Willem de Bruijn
2024-04-29 15:01 ` Andrew Lunn
2024-04-29 16:25   ` Jakub Kicinski

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).