Re: [PATCH] netconsole: Append kernel version to message

From: Breno Leitao
Date: Tue Jul 04 2023 - 11:54:04 EST


On Mon, Jul 03, 2023 at 06:46:25PM +0200, Andrew Lunn wrote:
> Hi Breno

Hello,

> Why not just send the message without uname appended. You probably
> want to see the OOM messages...
>
> Also, what context are we in here? Should that be GFP_ATOMIC, which
> net/core/netpoll.c is using to allocate the skbs?

Maybe this is not necessary anymore, since I might be using the buffer
already allocated.

> > +static inline void send_msg_udp(struct netconsole_target *nt,
> > + const char *msg, unsigned int len)
> > +{
> > +#ifdef CONFIG_NETCONSOLE_UNAME
> > + send_ext_msg_udp_uname(nt, msg, len);
> > +#else
> > + send_ext_msg_udp(nt, msg, len);
> > +#endif
>
> Please use
>
> if (IS_ENABLED(CONFIG_NETCONSOLE_UNAME)) {} else {}
>
> so the code is compiled and then thrown away. That nakes build testing
> more efficient.

Makes total sense, I am incorporating it into v2 now.

Thanks!