[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250611-netconsole-msgid-v1-1-1784a51feb1e@gmail.com>
Date: Wed, 11 Jun 2025 07:36:03 -0700
From: Gustavo Luiz Duarte <gustavold@...il.com>
To: Breno Leitao <leitao@...ian.org>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Shuah Khan <shuah@...nel.org>, Simon Horman <horms@...nel.org>,
Jonathan Corbet <corbet@....net>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-doc@...r.kernel.org,
Gustavo Luiz Duarte <gustavold@...il.com>
Subject: [PATCH net-next 1/5] netconsole: introduce 'msgid' as a new
sysdata field
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@...il.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
Powered by blists - more mailing lists