netpoll: Code organization improvements
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected] change-id 20250617-netpoll_ip_ref-dca7934ea548Versions newest first
Patches in v1 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | netpoll: Extract carrier wait functionnet/ | +16 | 1 reply | Applied |
| 2/3 | netpoll: extract IPv4 address retrieval into helper functionnet/ | +31 | 1 reply | Applied |
| 3/3 | netpoll: Extract IPv6 address retrieval functionnet/ | +44 | 1 reply | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Simon Horman |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] netpoll: Code organization improvements
The netpoll_setup() function has grown complex over time, mixing different error handling and concerns like carrier waiting, IPv4 address retrieval, and IPv6 address retrieval all within a single function, which is huge (127 LoC).
This patch series refactors the netpoll_setup() function to improve code organization and readability by extracting logical blocks into dedicated helper functions. netpoll_setup() length is reduced to 72 LoC.
This series breaks down these responsibilities into focused helper functions.
The changes are purely structural with no functional modifications.
This changes were tested with the netconsole tests and the netpoll selftest (WIP)[1]
---
Breno Leitao (3):
netpoll: Extract carrier wait function
netpoll: extract IPv4 address retrieval into helper function
netpoll: Extract IPv6 address retrieval function
net/core/netpoll.c | 152 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 91 insertions(+), 61 deletions(-)
---
base-commit: ec315832f6f98f0fa5719b8b5dd2214ca44ef3f1
change-id: 20250617-netpoll_ip_ref-dca7934ea548
Best regards,
Signature · 1 line
Breno Leitao <[email protected]>