On Wed, Jul 02, 2025 at 03:06:36AM -0700, Breno Leitao wrote:
Move IPv4 header construction from netpoll_send_udp() into a new static helper function push_ipv4(). This completes the refactoring started with IPv6 header handling, creating symmetric helper functions for both IP versions.
Changes include:
- Extracting IPv4 header setup logic into push_ipv4()
- Replacing inline IPv4 code with helper call
- Moving eth assignment after helper calls for consistency
The refactoring reduces code duplication and improves maintainability by isolating IP version-specific logic.
Signed-off-by: Breno Leitao leitao@debian.org
Reviewed-by: Simon Horman horms@kernel.org