Re: [PATCH net-next v2 1/4] netconsole: Simplify send_fragmented_body()
From: Breno Leitao
Date: Fri Nov 14 2025 - 07:02:28 EST
On Thu, Nov 13, 2025 at 08:42:18AM -0800, Gustavo Luiz Duarte wrote:
> Refactor send_fragmented_body() to use separate offset tracking for
> msgbody, and extradata instead of complex conditional logic.
> The previous implementation used boolean flags and calculated offsets
> which made the code harder to follow.
>
> The new implementation maintains independent offset counters
> (msgbody_offset, extradata_offset) and processes each section
> sequentially, making the data flow more straightforward and the code
> easier to maintain.
>
> This is a preparatory refactoring with no functional changes, which will
> allow easily splitting extradata_complete into separate userdata and
> sysdata buffers in the next patch.
>
> Signed-off-by: Gustavo Luiz Duarte <gustavold@xxxxxxxxx>
Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>
Thanks for this refactor.
--breno