[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250130103544.GE113107@kernel.org>
Date: Thu, 30 Jan 2025 10:35:44 +0000
From: Simon Horman <horms@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Jonathan Corbet <corbet@....net>, Shuah Khan <shuah@...nel.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kselftest@...r.kernel.org,
rdunlap@...radead.org, kernel-team@...a.com
Subject: Re: [PATCH RFC net-next v3 1/8] netconsole: consolidate send buffers
into netconsole_target struct
On Tue, Jan 28, 2025 at 04:11:28PM +0000, Simon Horman wrote:
> On Fri, Jan 24, 2025 at 07:16:40AM -0800, Breno Leitao wrote:
> > Move the static buffers from send_msg_no_fragmentation() and
> > send_msg_fragmented() into the netconsole_target structure. This
> > simplifies the code by:
> > - Eliminating redundant static buffers
> > - Centralizing buffer management in the target structure
> > - Reducing memory usage by 1KB (one buffer instead of two)
> >
> > The buffer in netconsole_target is protected by target_list_lock,
> > maintaining the same synchronization semantics as the original code.
> >
> > Suggested-by: Jakub Kicinski <kuba@...nel.org>
> > Signed-off-by: Breno Leitao <leitao@...ian.org>
> > ---
> > drivers/net/netconsole.c | 29 +++++++++++++++--------------
> > 1 file changed, 15 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> > index 86ab4a42769a49eebe5dd6f01dafafc6c86ec54f..1a78704681184673f5c1ba8ae665e46751384293 100644
> > --- a/drivers/net/netconsole.c
> > +++ b/drivers/net/netconsole.c
> > @@ -137,6 +137,8 @@ struct netconsole_target {
> > bool extended;
> > bool release;
> > struct netpoll np;
> > + /* protected by target_list_lock */
> > + char buf[MAX_PRINT_CHUNK];
>
> nit: buf should also be added to the Kernel doc for this structure.
>
> ...
Hi Breno,
With that fixed feel free to add:
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists