netpoll: factor out UDP header setup into push_udp() helper
authorBreno Leitao <leitao@debian.org>
Wed, 2 Jul 2025 10:06:37 +0000 (03:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 01:52:56 +0000 (18:52 -0700)
commitcacfb1f4e9f6e9b1f15517841b0ef19ae83b38be
treec159ec299014e3161d2c364dd03270408d9a29db
parent8c27639dbe549a58415c83a078c28e6b00c73f0f
netpoll: factor out UDP header setup into push_udp() helper

Move UDP header construction from netpoll_send_udp() into a new
static helper function push_udp(). This completes the protocol
layer refactoring by:

1. Creating a dedicated helper for UDP header assembly
2. Removing UDP-specific logic from the main send function
3. Establishing a consistent pattern with existing IPv4/IPv6 helpers:
   - push_udp()
   - push_ipv4()
   - push_ipv6()

The change improves code organization and maintains the encapsulation
pattern established in previous refactorings.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250702-netpoll_untagle_ip-v2-5-13cf3db24e2b@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/netpoll.c