netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] net: netconsole: configfs entries for boot target
@ 2023-10-02 15:53 Breno Leitao
  2023-10-02 15:53 ` [PATCH 1/3] netconsole: Initialize configfs_item for default targets Breno Leitao
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Breno Leitao @ 2023-10-02 15:53 UTC (permalink / raw)
  To: jlbec, kuba, davem, pabeni; +Cc: hch, netdev, linux-kernel, horms

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

Breno Leitao (3):
  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 | 21 ++++++++--
 drivers/net/netconsole.c                | 51 ++++++++++++++++++++++++-
 2 files changed, 67 insertions(+), 5 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-05 10:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 15:53 [PATCH 0/3] net: netconsole: configfs entries for boot target Breno Leitao
2023-10-02 15:53 ` [PATCH 1/3] netconsole: Initialize configfs_item for default targets Breno Leitao
2023-10-04 19:59   ` Joel Becker
2023-10-02 15:53 ` [PATCH 2/3] netconsole: Attach cmdline target to dynamic target Breno Leitao
2023-10-04 20:02   ` Joel Becker
2023-10-02 15:53 ` [PATCH 3/3] Documentation: netconsole: add support for cmdline targets Breno Leitao
2023-10-04 20:09   ` Joel Becker
2023-10-05 10:29     ` Breno Leitao

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).