From: Breno Leitao <leitao@debian.org>
To: jlbec@evilplan.org, kuba@kernel.org, davem@davemloft.net,
pabeni@redhat.com
Cc: hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
horms@kernel.org
Subject: [PATCH net-next v3 0/4] net: netconsole: configfs entries for boot target
Date: Tue, 10 Oct 2023 02:37:47 -0700 [thread overview]
Message-ID: <20231010093751.3878229-1-leitao@debian.org> (raw)
There is a limitation in netconsole, where it is impossible to
disable or modify the target created from the command line parameter.
(netconsole=...).
"netconsole" cmdline parameter sets the remote IP, and if the remote IP
changes, the machine needs to be rebooted (with the new remote IP set in
the command line parameter).
This allows the user to modify a target without the need to restart the
machine.
This functionality sits on top of the dynamic target reconfiguration that is
already implemented in netconsole.
The way to modify a boot time target is creating special named configfs
directories, that will be associated with the targets coming from
`netconsole=...`.
Example:
Let's suppose you have two netconsole targets defined at boot time::
netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc;4444@10.0.0.1/eth1,9353@10.0.0.3/12:34:56:78:9a:bc
You can modify these targets in runtime by creating the following targets::
$ mkdir cmdline1
$ cat cmdline1/remote_ip
10.0.0.3
$ echo 0 > cmdline1/enabled
$ echo 10.0.0.4 > cmdline1/remote_ip
$ echo 1 > cmdline1/enabled
---
Changelog:
* Version 3:
* Move alloc_param_target() to the bottom of the file to avoid
forward declaration.
* Version 2:
* Replaced the name of the NETCONSOLE_PARAM_TARGET_NAME macro
* Improved the code documentation
* Improved the user documentation
---
Breno Leitao (4):
netconsole: move init/cleanup functions lower
netconsole: Initialize configfs_item for default targets
netconsole: Attach cmdline target to dynamic target
Documentation: netconsole: add support for cmdline targets
Documentation/networking/netconsole.rst | 22 +++-
drivers/net/netconsole.c | 155 ++++++++++++++++--------
2 files changed, 121 insertions(+), 56 deletions(-)
--
2.34.1
next reply other threads:[~2023-10-10 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 9:37 Breno Leitao [this message]
2023-10-10 9:37 ` [PATCH net-next v3 1/4] netconsole: move init/cleanup functions lower Breno Leitao
2023-10-10 9:37 ` [PATCH net-next v3 2/4] netconsole: Initialize configfs_item for default targets Breno Leitao
2023-10-10 19:27 ` Joel Becker
2023-10-11 1:10 ` Jakub Kicinski
2023-10-11 12:38 ` Breno Leitao
2023-10-10 9:37 ` [PATCH net-next v3 3/4] netconsole: Attach cmdline target to dynamic target Breno Leitao
2023-10-10 9:37 ` [PATCH net-next v3 4/4] Documentation: netconsole: add support for cmdline targets 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=20231010093751.3878229-1-leitao@debian.org \
--to=leitao@debian.org \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=horms@kernel.org \
--cc=jlbec@evilplan.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).