linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] netpoll: Code organization improvements
@ 2025-06-18  9:32 Breno Leitao
  2025-06-18  9:32 ` [PATCH 1/3] netpoll: Extract carrier wait function Breno Leitao
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Breno Leitao @ 2025-06-18  9:32 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman
  Cc: jv, netdev, linux-kernel, Breno Leitao, gustavold

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]

Link: https://lore.kernel.org/all/20250612-netpoll_test-v1-1-4774fd95933f@debian.org/ [1]

Signed-off-by: Breno Leitao <leitao@debian.org>
---
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,
-- 
Breno Leitao <leitao@debian.org>


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

end of thread, other threads:[~2025-06-19 23:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18  9:32 [PATCH 0/3] netpoll: Code organization improvements Breno Leitao
2025-06-18  9:32 ` [PATCH 1/3] netpoll: Extract carrier wait function Breno Leitao
2025-06-19 10:19   ` Simon Horman
2025-06-18  9:32 ` [PATCH 2/3] netpoll: extract IPv4 address retrieval into helper function Breno Leitao
2025-06-19 10:19   ` Simon Horman
2025-06-18  9:32 ` [PATCH 3/3] netpoll: Extract IPv6 address retrieval function Breno Leitao
2025-06-19 10:20   ` Simon Horman
2025-06-18 15:25 ` [PATCH 0/3] netpoll: Code organization improvements Breno Leitao
2025-06-18 18:51   ` Jakub Kicinski
2025-06-19 23:20 ` 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).