Re: [PATCH net-next v2 02/10] net: netconsole: split send_ext_msg_udp() function

From: Simon Horman
Date: Mon Sep 09 2024 - 11:58:59 EST


On Mon, Sep 09, 2024 at 06:07:43AM -0700, Breno Leitao wrote:
> The send_ext_msg_udp() function has become quite large, currently
> spanning 102 lines. Its complexity, along with extensive pointer and
> offset manipulation, makes it difficult to read and error-prone.
>
> The function has evolved over time, and it’s now due for a refactor.
>
> To improve readability and maintainability, isolate the case where no
> message fragmentation occurs into a separate function, into a new
> send_msg_no_fragmentation() function. This scenario covers about 95% of
> the messages.
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>