linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Gustavo Luiz Duarte <gustavold@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>, Simon Horman <horms@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next 5/5] docs: netconsole: document msgid feature
Date: Wed, 11 Jun 2025 08:33:27 -0700	[thread overview]
Message-ID: <aEmhx1vutCK3RsOd@gmail.com> (raw)
In-Reply-To: <20250611-netconsole-msgid-v1-5-1784a51feb1e@gmail.com>

On Wed, Jun 11, 2025 at 07:36:07AM -0700, Gustavo Luiz Duarte wrote:
> Add documentation explaining the msgid feature in netconsole.
> 
> This feature appends unique id to the userdata dictionary. The message
> ID is populated from a per-target 32 bit counter which is incremented
> for each message sent to the target. This allows a target to detect if
> messages are dropped before reaching the target.
> 
> Signed-off-by: Gustavo Luiz Duarte <gustavold@gmail.com>
> ---
>  Documentation/networking/netconsole.rst | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/Documentation/networking/netconsole.rst b/Documentation/networking/netconsole.rst
> index a0076b542e9c..42a0acf2eb5e 100644
> --- a/Documentation/networking/netconsole.rst
> +++ b/Documentation/networking/netconsole.rst
> @@ -340,6 +340,28 @@ In this example, the message was sent by CPU 42.
>        cpu=42    # kernel-populated value
>  
>  
> +Message ID auto population in userdata
> +--------------------------------------
> +
> +Within the netconsole configfs hierarchy, there is a file named `msgid_enabled`
> +located in the `userdata` directory. This file controls the message ID
> +auto-population feature, which assigns a unique id to each message sent to a

Important to say that the message id will eventually wrap, thus it is
not very unique.

> +given target and appends the ID to userdata dictionary in every message sent.
> +
> +The message ID is built from a per-target 32 bit counter that is incremented
> +for every message sent to the target. This ID can be used by the target to
> +detect if messages were dropped before reaching the target.

Please also add that we cannot rely on console ids, given some messages
never make netconsole, thus, we never now if the message was never sent,
or, never received.

      reply	other threads:[~2025-06-11 15:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 14:36 [PATCH net-next 0/5] netconsole: Add support for msgid in sysdata Gustavo Luiz Duarte
2025-06-11 14:36 ` [PATCH net-next 1/5] netconsole: introduce 'msgid' as a new sysdata field Gustavo Luiz Duarte
2025-06-11 15:14   ` Breno Leitao
2025-06-11 14:36 ` [PATCH net-next 2/5] netconsole: implement configfs for msgid_enabled Gustavo Luiz Duarte
2025-06-11 15:22   ` Breno Leitao
2025-06-11 14:36 ` [PATCH net-next 3/5] netconsole: append msgid to sysdata Gustavo Luiz Duarte
2025-06-11 15:30   ` Breno Leitao
2025-06-11 20:40     ` Jakub Kicinski
2025-06-12 13:06     ` Gustavo Luiz Duarte
2025-06-11 14:36 ` [PATCH net-next 4/5] selftests: netconsole: Add tests for 'msgid' feature in sysdata Gustavo Luiz Duarte
2025-06-11 14:36 ` [PATCH net-next 5/5] docs: netconsole: document msgid feature Gustavo Luiz Duarte
2025-06-11 15:33   ` Breno Leitao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aEmhx1vutCK3RsOd@gmail.com \
    --to=leitao@debian.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavold@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).