linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] Documentation: netconsole: add support for cmdline targets
       [not found] <20231002155349.2032826-1-leitao@debian.org>
@ 2023-10-02 15:53 ` Breno Leitao
  2023-10-04 20:09   ` Joel Becker
  0 siblings, 1 reply; 3+ messages in thread
From: Breno Leitao @ 2023-10-02 15:53 UTC (permalink / raw)
  To: jlbec, kuba, davem, pabeni, Eric Dumazet, Jonathan Corbet
  Cc: hch, netdev, linux-kernel, horms, open list:DOCUMENTATION

With the previous patches, there is no more limitation at modifying the
targets created at boot time (or module load time).

Document the way on how to create the configfs directories to be able to
modify these netconsole targets.

The design discussion about this topic could be found at:
https://lore.kernel.org/all/ZRWRal5bW93px4km@gmail.com/

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 Documentation/networking/netconsole.rst | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/Documentation/networking/netconsole.rst b/Documentation/networking/netconsole.rst
index 7a9de0568e84..b25c89608e50 100644
--- a/Documentation/networking/netconsole.rst
+++ b/Documentation/networking/netconsole.rst
@@ -99,9 +99,6 @@ Dynamic reconfiguration:
 Dynamic reconfigurability is a useful addition to netconsole that enables
 remote logging targets to be dynamically added, removed, or have their
 parameters reconfigured at runtime from a configfs-based userspace interface.
-[ Note that the parameters of netconsole targets that were specified/created
-from the boot/module option are not exposed via this interface, and hence
-cannot be modified dynamically. ]
 
 To include this feature, select CONFIG_NETCONSOLE_DYNAMIC when building the
 netconsole module (or kernel, if netconsole is built-in).
@@ -155,6 +152,24 @@ You can also update the local interface dynamically. This is especially
 useful if you want to use interfaces that have newly come up (and may not
 have existed when netconsole was loaded / initialized).
 
+You can control and modify the targets defined at boot time (or module load
+time) by creating special targets names. These special targets are named
+`cmdline` concatenated to an integer, example: `cmdline0`.
+
+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 cmdline0
+ cat cmdline0/remote_ip
+ 10.0.0.2
+
+ mkdir cmdline1
+ cat cmdline1/remote_ip
+ 10.0.0.3
+
 Extended console:
 =================
 
-- 
2.34.1


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

* Re: [PATCH 3/3] Documentation: netconsole: add support for cmdline targets
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Becker @ 2023-10-04 20:09 UTC (permalink / raw)
  To: Breno Leitao
  Cc: kuba, davem, pabeni, Eric Dumazet, Jonathan Corbet, hch, netdev,
	linux-kernel, horms, open list:DOCUMENTATION

On Mon, Oct 02, 2023 at 08:53:49AM -0700, Breno Leitao wrote:
> @@ -155,6 +152,24 @@ You can also update the local interface dynamically. This is especially
>  useful if you want to use interfaces that have newly come up (and may not
>  have existed when netconsole was loaded / initialized).
>  
> +You can control and modify the targets defined at boot time (or module load
> +time) by creating special targets names. These special targets are named
> +`cmdline` concatenated to an integer, example: `cmdline0`.

The special names are already "created", so perhaps it's a little
clearer to say something like:

```
+Netconsole targets defined at boot time (or module load time) with the
+`netconsole=` param are assigned the name `cmdline<index>`.  For
+example, the first target in the parameter is named `cmdline0`.  You
+can control and modify these targets by creating configfs directories
+with the matching name.
```

> +
> +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 cmdline0
> + cat cmdline0/remote_ip
> + 10.0.0.2
> +
> + mkdir cmdline1
> + cat cmdline1/remote_ip
> + 10.0.0.3
> +

And of course keep the examples as you've described them.

Thanks,
Joel

-- 

Life's Little Instruction Book #337

	"Reread your favorite book."

			http://www.jlbec.org/
			jlbec@evilplan.org

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

* Re: [PATCH 3/3] Documentation: netconsole: add support for cmdline targets
  2023-10-04 20:09   ` Joel Becker
@ 2023-10-05 10:29     ` Breno Leitao
  0 siblings, 0 replies; 3+ messages in thread
From: Breno Leitao @ 2023-10-05 10:29 UTC (permalink / raw)
  To: kuba, davem, pabeni, Eric Dumazet, Jonathan Corbet, hch, netdev,
	linux-kernel, horms, open list:DOCUMENTATION

On Wed, Oct 04, 2023 at 01:09:16PM -0700, Joel Becker wrote:
> On Mon, Oct 02, 2023 at 08:53:49AM -0700, Breno Leitao wrote:
> > @@ -155,6 +152,24 @@ You can also update the local interface dynamically. This is especially
> >  useful if you want to use interfaces that have newly come up (and may not
> >  have existed when netconsole was loaded / initialized).
> >  
> > +You can control and modify the targets defined at boot time (or module load
> > +time) by creating special targets names. These special targets are named
> > +`cmdline` concatenated to an integer, example: `cmdline0`.
> 
> The special names are already "created", so perhaps it's a little
> clearer to say something like:
> 
> ```
> +Netconsole targets defined at boot time (or module load time) with the
> +`netconsole=` param are assigned the name `cmdline<index>`.  For
> +example, the first target in the parameter is named `cmdline0`.  You
> +can control and modify these targets by creating configfs directories
> +with the matching name.
> ```

That is way better. Thanks for the review.
I will send an updated version soon.

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20231002155349.2032826-1-leitao@debian.org>
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).