Skip to content

netpoll: Code organization improvements

Breno Leitao lkml netdev 1 version Applied

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-dca7934ea548

Versions newest first

  1. v1 Latest3 patches 5 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3netpoll: Extract carrier wait functionnet/core/netpoll.c+16 -121 replyApplied
2/3netpoll: extract IPv4 address retrieval into helper functionnet/core/netpoll.c+31 -171 replyApplied
3/3netpoll: Extract IPv6 address retrieval functionnet/core/netpoll.c+44 -321 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSimon Horman
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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]>