netpoll: Untangle netpoll and netconsole
Get series with b4
b4 am [email protected] change-id 20250902-netpoll_untangle_v3-e9f41781334eVersions newest first
- v1 Latest7 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | netconsole: Split UDP message building and sending operationsdrivers/ include/ net/ | +21 | 1 reply | |
| 2/7 | netpoll: move prepare skb functions to netconsoledrivers/ include/ net/ | +150 | 1 reply | |
| 3/7 | netpoll: Move netpoll_cleanup implementation to netconsoledrivers/ include/ net/ | +10 | 3 replies | |
| 4/7 | netpoll: Export zap_completion_queueinclude/ net/ | +3 | 3 replies | |
| 5/7 | netpoll: Move SKBs pool to netconsole sidedrivers/ net/ | +56 | 1 reply | |
| 6/7 | netpoll: Move find_skb() to netconsole and make it staticdrivers/ include/ net/ | +27 | 1 reply | |
| 7/7 | netpoll: Flush skb_pool as part of netconsole cleanupdrivers/ net/ | +11 | 3 replies |
Reviews trailers per patch
6 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Willem de Bruijn |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | R-b |
| 5/7 | |
| 6/7 | R-b |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/7] netpoll: Untangle netpoll and netconsole
This patch series refactors the netpoll and netconsole subsystems to achieve better separation of concerns and improved code modularity. The main goal is to move netconsole-specific functionality out of the generic netpoll core, making netpoll a cleaner, more focused transmission-only interface.
Current problems:
* SKB pool is only used by netconsole, but, available in all netpoll instances, wasting memory.
* Given, netpoll populates the SKB and send the package for netconsole, there is no way to have a fine grained lock, to protect only the SKB population (specifically the netconsole target ->buf).
* In the future (when netconsole supports nbcon), the SKB will be populated and the TX deferred, which is impossible in the current configuration.
Key architectural changes:
1. SKB Pool Management Migration: Move all SKB pool management from netpoll core to netconsole driver, since netconsole is the sole user of this functionality. This reduces memory overhead for other netpoll users.
2. UDP Packet Construction Separation: Move UDP/IP packet preparation logic from netpoll to netconsole, making netpoll purely SKB transmission-focused.
3. Function Splitting: Split netpoll_send_udp() into separate preparation (netpoll_prepare_skb) and transmission (netpoll_send_skb) operations for better modularity and locking strategies.
4. Cleanup Consolidation: Move netpoll_cleanup() implementation to netconsole since it's the only caller, centralizing cleanup logic.
5. Enable netconsole to support nbcon, as being discussed in [1].
* I have a PoC[2] for migrating netconsole to nbcon, which depends on this chage.
The series maintains full backward compatibility, and shouldn't have any visible change for the user.
To: Andrew Lunn <[email protected]>
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: Simon Horman <[email protected]>
To: Sebastian Andrzej Siewior <[email protected]>
To: Clark Williams <[email protected]>
To: Steven Rostedt <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Breno Leitao (7):
netconsole: Split UDP message building and sending operations
netpoll: move prepare skb functions to netconsole
netpoll: Move netpoll_cleanup implementation to netconsole
netpoll: Export zap_completion_queue
netpoll: Move SKBs pool to netconsole side
netpoll: Move find_skb() to netconsole and make it static
netpoll: Flush skb_pool as part of netconsole cleanup
drivers/net/netconsole.c | 273 +++++++++++++++++++++++++++++++++++++++++++++-- include/linux/netpoll.h | 2 +- net/core/netpoll.c | 248 +----------------------------------------- 3 files changed, 268 insertions(+), 255 deletions(-)
---
base-commit: 2fd4161d0d2547650d9559d57fc67b4e0a26a9e3
change-id: 20250902-netpoll_untangle_v3-e9f41781334e
Best regards,
Signature · 1 line
Breno Leitao <[email protected]>