netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] net: improve core queue API handling while device is down
@ 2025-02-06 22:56 Jakub Kicinski
  2025-02-06 22:56 ` [PATCH net-next v2 1/4] net: refactor netdev_rx_queue_restart() to use local qops Jakub Kicinski
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Jakub Kicinski @ 2025-02-06 22:56 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, almasrymina,
	Jakub Kicinski

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

Alternatively we could reject installing MP while the device is down
but the MP assignment survives ifdown (so presumably MP doesn't cease
to exist while down), and in general we allow configuration while down.

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.

v2:
 - allow also mode 2 and 3 (patch 3 is new)
v1: https://lore.kernel.org/20250205190131.564456-1-kuba@kernel.org

Jakub Kicinski (4):
  net: refactor netdev_rx_queue_restart() to use local qops
  net: devmem: don't call queue stop / start when the interface is down
  net: page_pool: avoid false positive warning if NAPI was never added
  netdevsim: allow normal queue reset while down

 include/net/netdev_queues.h              |  4 +++
 net/core/dev.h                           | 12 ++++++++
 drivers/net/netdevsim/netdev.c           | 10 +++----
 net/core/netdev_rx_queue.c               | 37 +++++++++++++-----------
 net/core/page_pool.c                     |  7 ++---
 tools/testing/selftests/net/nl_netdev.py | 18 +++++++++++-
 6 files changed, 59 insertions(+), 29 deletions(-)

-- 
2.48.1


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

end of thread, other threads:[~2025-02-08  4:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 22:56 [PATCH net-next v2 0/4] net: improve core queue API handling while device is down Jakub Kicinski
2025-02-06 22:56 ` [PATCH net-next v2 1/4] net: refactor netdev_rx_queue_restart() to use local qops Jakub Kicinski
2025-02-06 23:05   ` Mina Almasry
2025-02-06 23:06     ` Jakub Kicinski
2025-02-06 22:56 ` [PATCH net-next v2 2/4] net: devmem: don't call queue stop / start when the interface is down Jakub Kicinski
2025-02-06 23:12   ` Mina Almasry
2025-02-06 22:56 ` [PATCH net-next v2 3/4] net: page_pool: avoid false positive warning if NAPI was never added Jakub Kicinski
2025-02-07  0:32   ` Mina Almasry
2025-02-06 22:56 ` [PATCH net-next v2 4/4] netdevsim: allow normal queue reset while down Jakub Kicinski
2025-02-07  0:55   ` Mina Almasry
2025-02-08  4:20 ` [PATCH net-next v2 0/4] net: improve core queue API handling while device is down 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 NNTP newsgroup(s).