netconsole: Support multiple logging targets
Subsystems (4)
PATCH 25/28 netconsole: Support multiple logging targets
From: Satyam Sharma <[email protected]>
Based upon initial work by Keiichi Kii <[email protected]>.
This patch introduces support for multiple targets, independent of CONFIG_NETCONSOLE_DYNAMIC -- this is useful even in the default case and (including the infrastructure introduced in previous patches) doesn't really add too many bytes to module text. All the complexity (and size) comes with the dynamic reconfigurability / userspace interface patch, and so it's plausible users may want to keep this enabled but that disabled (say to avoid a dependency on CONFIG_CONFIGFS_FS too).
Also update documentation to mention the use of ";" separator to specify multiple logging targets in the boot/module option string.
Brief overview:
We maintain a target_list (and corresponding lock). Get rid of the static "default_target" and introduce allocation and release functions for our netconsole_target objects (but keeping sure to preserve previous behaviour such as default values). During init_netconsole(), ";" is used as the separator to identify multiple target specifications in the boot/module option string. The target specifications are parsed and netpolls setup. During exit, the target_list is torn down and all items released.
---
Documentation/networking/netconsole.txt | 6 drivers/net/netconsole.c | 171 ++++++++++++++++------ 2 files changed, 137 insertions(+), 40 deletions(-)
Documentation/networking/netconsole.txt renamed from Documentation/networking/netconsole.txt~netconsole-support-multiple-logging-targets +6 -0
@@ -34,6 +34,12 @@ Examples: insmod netconsole netconsole=@/,@10.0.0.2/ +It also supports logging to multiple remote agents by specifying +parameters for the multiple agents separated by semicolons and the +complete string enclosed in "quotes", thusly: + + modprobe netconsole netconsole="@/,@10.0.0.2/;@/eth1,[email protected]/" + Built-in netconsole starts immediately after the TCP stack is initialized and attempts to bring up the supplied dev at the supplied address.
drivers/net/netconsole.c renamed from drivers/net/netconsole.c~netconsole-support-multiple-logging-targets +131 -40
232 lines not on this page · raw message
_
From: [email protected]
Date: Fri, 10 Aug 2007 14:12:07 -0700
Quoted 25 lines
From: Satyam Sharma <[email protected]>
Based upon initial work by Keiichi Kii <[email protected]>.
This patch introduces support for multiple targets, independent of
CONFIG_NETCONSOLE_DYNAMIC-- this is useful even in the default case and (including the infrastructure introduced in previous patches) doesn't really add too many bytes to module text. All the complexity (and size) comes with the dynamic reconfigurability / userspace interface patch, and so it's plausible users may want to keep this enabled but that disabled (say to avoid a dependency onCONFIG_CONFIGFS_FStoo).Also update documentation to mention the use of ";" separator to specify multiple logging targets in the boot/module option string.
Brief overview:
We maintain a
target_list(and corresponding lock). Get rid of the static "default_target" and introduce allocation and release functions for ournetconsole_targetobjects (but keeping sure to preserve previous behaviour such as default values). Duringinit_netconsole(), ";" is used as the separator to identify multiple target specifications in the boot/module option string. The target specifications are parsed and netpolls setup. During exit, thetarget_listis torn down and all items released.
Quoted 4 lines
Signed-off-by Satyam Sharma <[email protected]>Signed-off-by Keiichi Kii <[email protected]>Cc Matt Mackall <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied to net-2.6.24, thanks!