Message ID | 20231012111401.333798-5-leitao@debian.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 7eeb84d89f2e561ac5b97e0142c029908ddf00d5 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: netconsole: configfs entries for boot target | expand |
Context | Check | Description |
---|---|---|
netdev/series_format | success | Posting correctly formatted |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 9 this patch: 9 |
netdev/cc_maintainers | success | CCed 7 of 7 maintainers |
netdev/build_clang | success | Errors and warnings before: 9 this patch: 9 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/deprecated_api | success | None detected |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 9 this patch: 9 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 34 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On Thu, Oct 12, 2023 at 04:14:01AM -0700, Breno Leitao wrote: > 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> Reviewed-by: Joel Becker <jlbec@evilplan.org> > --- > Documentation/networking/netconsole.rst | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > diff --git a/Documentation/networking/netconsole.rst b/Documentation/networking/netconsole.rst > index 7a9de0568e84..390730a74332 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,25 @@ 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). > > +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 > + > Extended console: > ================= > > -- > 2.34.1 >
diff --git a/Documentation/networking/netconsole.rst b/Documentation/networking/netconsole.rst index 7a9de0568e84..390730a74332 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,25 @@ 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). +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 + Extended console: =================
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 | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)