Re: [PATCH net-next 0/2] net: netconsole: convert to NBCON console infrastructure
From: Breno Leitao
Date: Fri Jan 16 2026 - 14:40:17 EST
Hello Petr,
On Fri, Jan 16, 2026 at 04:53:48PM +0100, Petr Mladek wrote:
> > Otherwise, it looks good to me.
> >
> > I tried to update your patch with the above proposal to see how
> > it looks and I got:
>
> The change seems to work. I have tested it with the following patch:
First of all, *thank you* so much for spending your time on it, this is
helpful.
> Then the extended console format should show also:
>
> ,cpu=XXX,pid=YYY,comm=ZZZ
Are you using this just for testing, or do you plan to get this output?
Context: netconsole outputs the message in a different way, similarly to the
printk dictionary. I.e, taskname and cpu come after, one entry per line:
<message>
SUBSYSTEM=net
DEVICE=+pci:0000:00:1f.6
cpu=42
taskname=NetworkManager
...
I would like to keep the same format, given users might be used to this format
already, where netconsole grabs teh cpu,pid,comm data and massage it before
outputing. Something as:
static int sysdata_append_taskname(struct netconsole_target *nt, int offset,
struct nbcon_write_context *wctxt)
{
return scnprintf(&nt->sysdata[offset],
MAX_EXTRADATA_ENTRY_LEN, " taskname=%s\n",
- current->comm);
+ wctxt->msg_comm);
}
Here is the full patch I was using to test the integration of netconsole and
the previous printk patch:
https://github.com/leitao/linux/commit/4175dc10719a15844b3a0bd7aa38158a913181a3