[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2024 12:53:19 +0100
From: Simon Horman <horms@...nel.org>
To: Matthew Wood <thepacketgeek@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
leitao@...ian.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 6/8] net: netconsole: cache userdata
formatted string in netconsole_target
On Fri, Jan 26, 2024 at 03:13:41PM -0800, Matthew Wood wrote:
> Store a formatted string for userdata that will be appended to netconsole
> messages. The string has a capacity of 4KB, as calculated by the userdatum
> entry length of 256 bytes and a max of 16 userdata entries.
>
> Update the stored netconsole_target->userdata_complete string with the new
> formatted userdata values when a userdatum is created, edited, or
> removed. Each userdata entry contains a trailing newline, which will be
> formatted as such in netconsole messages::
>
> 6.7.0-rc8-virtme,12,500,1646292204,-;test
> release=foo
> something=bar
> 6.7.0-rc8-virtme,12,500,1646292204,-;another test
> release=foo
> something=bar
>
> Enforcement of MAX_USERDATA_ITEMS is done in userdatum_make_item;
> update_userdata will not check for this case but will skip any userdata
> children over the limit of MAX_USERDATA_ITEMs.
>
> If a userdata entry/dir is created but no value is provided, that entry
> will be skipped. This is in part because update_userdata() can't be
> called in userdatum_make_item() since the item will not have been added
> to the userdata config_group children yet. To preserve the experience of
> adding an empty userdata that doesn't show up in the netconsole
> messages, purposefully skip emtpy userdata items even when
nit: empty
> update_userdata() can be called.
>
> Co-developed-by: Breno Leitao <leitao@...ian.org>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> Signed-off-by: Matthew Wood <thepacketgeek@...il.com>
..
Powered by blists - more mailing lists