All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Luiz Duarte <gustavold@gmail.com>
To: Breno Leitao <leitao@debian.org>,
	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>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
	 Gustavo Luiz Duarte <gustavold@gmail.com>
Subject: [PATCH net-next 1/5] netconsole: introduce 'msgid' as a new sysdata field
Date: Wed, 11 Jun 2025 07:36:03 -0700	[thread overview]
Message-ID: <20250611-netconsole-msgid-v1-1-1784a51feb1e@gmail.com> (raw)
In-Reply-To: <20250611-netconsole-msgid-v1-0-1784a51feb1e@gmail.com>

This adds a new sysdata field to enable assigning a per-target unique id
to each message sent to that target. This id can later be appended as
part of sysdata, allowing targets to detect dropped netconsole messages.
Update count_extradata_entries() to take the new field into account.

Signed-off-by: Gustavo Luiz Duarte <gustavold@gmail.com>
---
 drivers/net/netconsole.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 21077aff061c..787d170c3a0b 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -113,6 +113,8 @@ enum sysdata_feature {
 	SYSDATA_TASKNAME = BIT(1),
 	/* Kernel release/version as part of sysdata */
 	SYSDATA_RELEASE = BIT(2),
+	/* Include a per-target message ID as part of sysdata */
+	SYSDATA_MSGID = BIT(3),
 };
 
 /**
@@ -782,6 +784,8 @@ static size_t count_extradata_entries(struct netconsole_target *nt)
 		entries += 1;
 	if (nt->sysdata_fields & SYSDATA_RELEASE)
 		entries += 1;
+	if (nt->sysdata_fields & SYSDATA_MSGID)
+		entries += 1;
 
 	return entries;
 }

-- 
2.47.1


  reply	other threads:[~2025-06-11 14:37 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 ` Gustavo Luiz Duarte [this message]
2025-06-11 15:14   ` [PATCH net-next 1/5] netconsole: introduce 'msgid' as a new sysdata field 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

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=20250611-netconsole-msgid-v1-1-1784a51feb1e@gmail.com \
    --to=gustavold@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.