From: Breno Leitao <leitao@debian.org>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Cc: jv@jvosburgh.ne, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Breno Leitao <leitao@debian.org>,
gustavold@gmail.com
Subject: [PATCH 0/3] netpoll: Code organization improvements
Date: Wed, 18 Jun 2025 02:32:44 -0700 [thread overview]
Message-ID: <20250618-netpoll_ip_ref-v1-0-c2ac00fe558f@debian.org> (raw)
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>
next reply other threads:[~2025-06-18 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 9:32 Breno Leitao [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250618-netpoll_ip_ref-v1-0-c2ac00fe558f@debian.org \
--to=leitao@debian.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavold@gmail.com \
--cc=horms@kernel.org \
--cc=jv@jvosburgh.ne \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®