aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netconsole.c
diff options
context:
space:
mode:
authorGustavo Luiz Duarte <[email protected]>2025-06-16 17:08:35 +0000
committerDavid S. Miller <[email protected]>2025-06-18 09:46:10 +0000
commit15b3c930a29fe00971b52af8b87b1a1d67305190 (patch)
treebb3d39be58a98f74530a034ff853ff72277fb923 /drivers/net/netconsole.c
parentdpll: remove documentation of rclk_dev_name (diff)
downloadkernel-15b3c930a29fe00971b52af8b87b1a1d67305190.tar.gz
kernel-15b3c930a29fe00971b52af8b87b1a1d67305190.zip
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. Reviewed-by: Breno Leitao <[email protected]> Signed-off-by: Gustavo Luiz Duarte <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r--drivers/net/netconsole.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 89afe127b46c..2a273b29e276 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),
};
/**
@@ -799,6 +801,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;
}