linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] netconsole: Add support for msgid in sysdata
@ 2025-06-12 20:02 Gustavo Luiz Duarte
  2025-06-12 20:02 ` [PATCH net-next v2 1/5] netconsole: introduce 'msgid' as a new sysdata field Gustavo Luiz Duarte
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Gustavo Luiz Duarte @ 2025-06-12 20:02 UTC (permalink / raw)
  To: Breno Leitao, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Simon Horman,
	Jonathan Corbet
  Cc: netdev, linux-kernel, linux-kselftest, linux-doc,
	Gustavo Luiz Duarte

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.

Suggested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Gustavo Luiz Duarte <gustavold@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

---
Gustavo Luiz Duarte (5):
      netconsole: introduce 'msgid' as a new sysdata field
      netconsole: implement configfs for msgid_enabled
      netconsole: append msgid to sysdata
      selftests: netconsole: Add tests for 'msgid' feature in sysdata
      docs: netconsole: document msgid feature

 Documentation/networking/netconsole.rst            | 32 +++++++++++
 drivers/net/netconsole.c                           | 65 ++++++++++++++++++++++
 .../selftests/drivers/net/netcons_sysdata.sh       | 30 ++++++++++
 3 files changed, 127 insertions(+)
---
base-commit: 535de528015b56e34a40a8e1eb1629fadf809a84
change-id: 20250609-netconsole-msgid-b93c6f8e9c60

Best regards,
-- 
Gustavo Luiz Duarte <gustavold@gmail.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-16 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12 20:02 [PATCH net-next v2 0/5] netconsole: Add support for msgid in sysdata Gustavo Luiz Duarte
2025-06-12 20:02 ` [PATCH net-next v2 1/5] netconsole: introduce 'msgid' as a new sysdata field Gustavo Luiz Duarte
2025-06-12 20:02 ` [PATCH net-next v2 2/5] netconsole: implement configfs for msgid_enabled Gustavo Luiz Duarte
2025-06-12 20:02 ` [PATCH net-next v2 3/5] netconsole: append msgid to sysdata Gustavo Luiz Duarte
2025-06-14 19:51   ` Jakub Kicinski
2025-06-16 16:07     ` Gustavo Luiz Duarte
2025-06-12 20:02 ` [PATCH net-next v2 4/5] selftests: netconsole: Add tests for 'msgid' feature in sysdata Gustavo Luiz Duarte
2025-06-12 20:02 ` [PATCH net-next v2 5/5] docs: netconsole: document msgid feature Gustavo Luiz Duarte
2025-06-13  2:51   ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).