From: Breno Leitao <leitao@debian.org>
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>,
pmladek@suse.com, john.ogness@linutronix.de
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
asantostc@gmail.com, efault@gmx.de, gustavold@gmail.com,
calvin@wbinvd.org, jv@jvosburgh.net, mpdesouza@suse.com,
kernel-team@meta.com
Subject: [PATCH net-next v3 5/5] netconsole: pass wctxt to send_msg_udp() for consistency
Date: Thu, 22 Jan 2026 03:32:13 -0800 [thread overview]
Message-ID: <20260122-nbcon-v3-5-a722f2f0dfa5@debian.org> (raw)
In-Reply-To: <20260122-nbcon-v3-0-a722f2f0dfa5@debian.org>
Refactor send_msg_udp() to take a struct nbcon_write_context pointer
instead of separate msg and len parameters. This makes its signature
consistent with send_ext_msg_udp() and prepares the function for
future use of execution context information from wctxt.
No functional change.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/netconsole.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 1dc53b749c75c..044ad1bc713fb 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -1715,16 +1715,16 @@ static void send_ext_msg_udp(struct netconsole_target *nt,
sysdata_len);
}
-static void send_msg_udp(struct netconsole_target *nt, const char *msg,
- unsigned int len)
+static void send_msg_udp(struct netconsole_target *nt,
+ struct nbcon_write_context *wctxt)
{
- const char *tmp = msg;
- int frag, left = len;
+ const char *msg = wctxt->outbuf;
+ int frag, left = wctxt->len;
while (left > 0) {
frag = min(left, MAX_PRINT_CHUNK);
- send_udp(nt, tmp, frag);
- tmp += frag;
+ send_udp(nt, msg, frag);
+ msg += frag;
left -= frag;
}
}
@@ -1758,7 +1758,7 @@ static void netconsole_write(struct nbcon_write_context *wctxt, bool extended)
if (extended)
send_ext_msg_udp(nt, wctxt);
else
- send_msg_udp(nt, wctxt->outbuf, wctxt->len);
+ send_msg_udp(nt, wctxt);
nbcon_exit_unsafe(wctxt);
}
--
2.47.3
prev parent reply other threads:[~2026-01-22 11:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260122-nbcon-v3-0-a722f2f0dfa5@debian.org>
2026-01-22 11:32 ` [PATCH net-next v3 1/5] printk: Add execution context (task name/CPU) to printk_info Breno Leitao
2026-01-22 11:32 ` [PATCH net-next v3 2/5] netconsole: extract message fragmentation into send_msg_udp() Breno Leitao
2026-01-22 11:32 ` [PATCH net-next v3 3/5] netconsole: convert to NBCON console infrastructure Breno Leitao
2026-01-22 11:32 ` [PATCH net-next v3 4/5] netconsole: Use printk context for CPU and task information Breno Leitao
2026-01-22 12:21 ` Petr Mladek
2026-01-22 12:51 ` Breno Leitao
2026-01-22 18:32 ` Breno Leitao
2026-01-22 11:32 ` 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=20260122-nbcon-v3-5-a722f2f0dfa5@debian.org \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=andrew+netdev@lunn.ch \
--cc=asantostc@gmail.com \
--cc=calvin@wbinvd.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=efault@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=gustavold@gmail.com \
--cc=john.ogness@linutronix.de \
--cc=jv@jvosburgh.net \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpdesouza@suse.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.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