Re: [PATCH 0/3] netpoll: Code organization improvements
From: Breno Leitao
Date: Wed Jun 18 2025 - 11:26:05 EST
On Wed, Jun 18, 2025 at 02:32:44AM -0700, Breno Leitao wrote:
> 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@xxxxxxxxxx/ [1]
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
I forgot to tag this in the header, but this is against 'net-next'.
I will send a v2 tomorrow with the proper "net-next" tag.