Netdev Archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v5 0/2] netdevsim: add NAPI support
@ 2024-05-07 16:32 David Wei
  2024-05-07 16:32 ` [PATCH net-next v5 1/2] " David Wei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Wei @ 2024-05-07 16:32 UTC (permalink / raw
  To: netdev; +Cc: Jakub Kicinski, David S. Miller, Eric Dumazet, Paolo Abeni

Add NAPI support to netdevsim and register its Rx queues with NAPI
instances. Then add a selftest using the new netdev Python selftest
infra to exercise the existing Netdev Netlink API, specifically the
queue-get API.

This expands test coverage and further fleshes out netdevsim as a test
device. It's still my goal to make it useful for testing things like
flow steering and ZC Rx.

-----
Changes since v4:
* Rebase

Changes since v3:
* Add missing ksft_exit() at end of test
* Check for queue-api at start of test and skip early
* Don't swallow exceptions and convert to skip

Changes since v2:
* Fix null-ptr-deref on cleanup path if netdevsim is init as VF
* Handle selftest failure if real netdev fails to change queues
* Selftest addremove_queue test case:
  * Skip if queues == 1
  * Changes either combined or rx queue depending on how the netdev is
    configured

Changes since v1:
* Use sk_buff_head instead of a list for per-rq skb queue
* Drop napi_schedule() if skb queue is not empty in napi poll
* Remove netif_carrier_on() in open()
* Remove unused page pool ptr in struct netdevsim
* Up the netdev in NetDrvEnv automatically
* Pass Netdev Netlink as a param instead of using globals
* Remove unused Python imports in selftest

David Wei (2):
  netdevsim: add NAPI support
  net: selftest: add test for netdev netlink queue-get API

 drivers/net/netdevsim/netdev.c                | 209 +++++++++++++++++-
 drivers/net/netdevsim/netdevsim.h             |   8 +-
 tools/testing/selftests/drivers/net/Makefile  |   1 +
 .../selftests/drivers/net/lib/py/env.py       |   6 +-
 tools/testing/selftests/drivers/net/queues.py |  66 ++++++
 tools/testing/selftests/net/lib/py/nsim.py    |   4 +-
 tools/testing/selftests/net/lib/py/utils.py   |   8 +-
 7 files changed, 282 insertions(+), 20 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/queues.py

-- 
2.43.0


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

end of thread, other threads:[~2024-05-09  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 16:32 [PATCH net-next v5 0/2] netdevsim: add NAPI support David Wei
2024-05-07 16:32 ` [PATCH net-next v5 1/2] " David Wei
2024-05-07 16:32 ` [PATCH net-next v5 2/2] net: selftest: add test for netdev netlink queue-get API David Wei
2024-05-09  2:10 ` [PATCH net-next v5 0/2] netdevsim: add NAPI support patchwork-bot+netdevbpf

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 read-only IMAP folder(s) and NNTP newsgroup(s).