mbox series

[net-next,0/3] net: improve core queue API handling while device is down

Message ID 20250205190131.564456-1-kuba@kernel.org (mailing list archive)
Headers show
Series net: improve core queue API handling while device is down | expand

Message

Jakub Kicinski Feb. 5, 2025, 7:01 p.m. UTC
The core netdev_rx_queue_restart() doesn't currently take into account
that the device may be down. The current and proposed queue API
implementations deal with this by rejecting queue API calls while
the device is down. We can do better, in theory we can still allow
devmem binding when the device is down - we shouldn't stop and start
the queues just try to allocate the memory. The reason we allocate
the memory is that memory provider binding checks if any compatible
page pool has been created (page_pool_check_memory_provider()).

Previously I thought we need this as a fix, but gve rejects page pool
calls while down, and so did Saeed in the patches he posted. So this
series just makes the core act more sensibly but practically should
be a noop for now.

Jakub Kicinski (3):
  net: refactor netdev_rx_queue_restart() to use local qops
  net: devmem: don't call queue stop / start when the interface is down
  netdevsim: allow normal queue reset while down

 include/net/netdev_queues.h              |  4 +++
 drivers/net/netdevsim/netdev.c           |  8 ++---
 net/core/netdev_rx_queue.c               | 37 +++++++++++++-----------
 tools/testing/selftests/net/nl_netdev.py | 17 ++++++++++-
 4 files changed, 43 insertions(+), 23 deletions(-)