]> git.ipfire.org Git - thirdparty/linux.git/commit
Merge branch 'netconsole-msgid' into main
authorDavid S. Miller <davem@davemloft.net>
Wed, 18 Jun 2025 09:46:31 +0000 (10:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jun 2025 09:46:31 +0000 (10:46 +0100)
commitfc4842cd0f117042a648cf565da4db0c04a604be
treecde3af2d90beb3e866c5c4fbc301c91d284eb1dc
parentec315832f6f98f0fa5719b8b5dd2214ca44ef3f1
parent8c587aa3fa5400467063f88a3a48f8e9480b2e33
Merge branch 'netconsole-msgid' into main

Gustavo Luiz Duarte says:

====================
netconsole: Add support for msgid in sysdata

This patch series introduces a new feature to netconsole which allows
appending a message ID to the userdata dictionary.

If the msgid feature is enabled, the message ID is built from a per-target 32
bit counter that is incremented and appended to every message sent to the target.

Example::
  echo 1 > "/sys/kernel/config/netconsole/cmdline0/userdata/msgid_enabled"
  echo "This is message #1" > /dev/kmsg
  echo "This is message #2" > /dev/kmsg
  13,434,54928466,-;This is message #1
   msgid=1
  13,435,54934019,-;This is message #2
   msgid=2

This feature can be used by the target to detect if messages were dropped or
reordered before reaching the target. This allows system administrators to
assess the reliability of their netconsole pipeline and detect loss of messages
due to network contention or temporary unavailability.

---
Changes in v3:
- Add kdoc documentation for msgcounter.
- Link to v2: https://lore.kernel.org/r/20250612-netconsole-msgid-v2-0-d4c1abc84bac@gmail.com

Changes in v2:
- Use wrapping_assign_add() to avoid warnings in UBSAN and friends.
- Improve documentation to clarify wrapping and distinguish msgid from sequnum.
- Rebase and fix conflict in prepare_extradata().
- Link to v1: https://lore.kernel.org/r/20250611-netconsole-msgid-v1-0-1784a51feb1e@gmail.com
====================

Suggested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Gustavo Luiz Duarte <gustavold@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>