diff options
author | Matthew Wood <thepacketgeek@gmail.com> | 2024-02-05 02:27:37 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-09 13:23:45 +0300 |
commit | df03f830d099f0811281a222aefdd9d400fa0b72 (patch) | |
tree | 326779e8fe9c8aac6077ab4b2e7f5caf32a8865d /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 8a6d5fec6c7f952d66ad362c249100d040a21e3f (diff) | |
download | linux-df03f830d099f0811281a222aefdd9d400fa0b72.tar.xz |
net: netconsole: cache userdata formatted string in netconsole_target
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 empty userdata items even when
update_userdata() can be called.
Co-developed-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Matthew Wood <thepacketgeek@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions