netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* configfs: Create config_item from netconsole
@ 2023-09-28 14:44 Breno Leitao
  2023-09-29 18:51 ` Joel Becker
  0 siblings, 1 reply; 3+ messages in thread
From: Breno Leitao @ 2023-09-28 14:44 UTC (permalink / raw)
  To: jlbec, hch; +Cc: netdev

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

I am planning to reuse the dynamic netconsole mechanism for
the 'command line' target, i.e., create a `cmdline` configfs_item for
the "command line" target, so, the user can modify the "command line"
target in configfs in runtime. Something as :

	echo 0 > /sys/kernel/config/netconsole/cmdline/enabled
	echo <new-IP> > /sys/kernel/config/netconsole/cmdline/remote_ip
	echo 1 > /sys/kernel/config/netconsole/cmdline/enabled

I didn't find a configfs API to register a configfs_item into a
config_group. Basically the make_item() callbacks are called once the
inode is created by the user at mkdir(2) time, but now I need to create
it at the driver initialization.

Should I create a configfs_register_item() to solve this problem?

Thanks!

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-28 14:44 configfs: Create config_item from netconsole Breno Leitao
2023-09-29 18:51 ` Joel Becker
2023-10-02 14:23   ` 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).