mbox series

[net-next,v3,0/2] netconsole: Populate dynamic entry even if netpoll fails

Message ID 20240822111051.179850-1-leitao@debian.org (mailing list archive)
Headers show
Series netconsole: Populate dynamic entry even if netpoll fails | expand

Message

Breno Leitao Aug. 22, 2024, 11:10 a.m. UTC
The current implementation of netconsole removes the entry and fails
entirely if netpoll fails to initialize. This approach is suboptimal, as
it prevents reconfiguration or re-enabling of the target through
configfs.

While this issue might seem minor if it were rare, it actually occurs
frequently when the network module is configured as a loadable module.

In such cases, the network is unavailable when netconsole initializes,
causing netpoll to fail. This failure forces users to reconfigure the
target from scratch, discarding any settings provided via the command
line.

The proposed change would keep the target available in configfs, albeit
in a disabled state. This modification allows users to adjust settings
or simply re-enable the target once the network module has loaded,
providing a more flexible and user-friendly solution.

Changelog:

v3:
  * Remove patch 2, that was only pr_err() at netconsole (Jakub)
  * Rework the "if" loop to be more readable (Jakub)
  * Print the cmdline number in the error log (Jakub)

v2:
  * Avoid late cleanup, and always returning an np in a clear slate when
    failing (Paolo)
  * Added another commit to log (pr_err) when netconsole doesn't fail,
    avoiding silent failures.
  * https://lore.kernel.org/all/20240819103616.2260006-1-leitao@debian.org/

v1:
  * https://lore.kernel.org/all/20240809161935.3129104-1-leitao@debian.org/

Breno Leitao (2):
  netpoll: Ensure clean state on setup failures
  net: netconsole: Populate dynamic entry even if netpoll fails

 drivers/net/netconsole.c | 15 +++++++++++----
 net/core/netpoll.c       | 15 ++++++++++-----
 2 files changed, 21 insertions(+), 9 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 26, 2024, 4:40 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 22 Aug 2024 04:10:46 -0700 you wrote:
> The current implementation of netconsole removes the entry and fails
> entirely if netpoll fails to initialize. This approach is suboptimal, as
> it prevents reconfiguration or re-enabling of the target through
> configfs.
> 
> While this issue might seem minor if it were rare, it actually occurs
> frequently when the network module is configured as a loadable module.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/2] netpoll: Ensure clean state on setup failures
    https://git.kernel.org/netdev/net-next/c/ae5a0456e0b4
  - [net-next,v3,2/2] net: netconsole: Populate dynamic entry even if netpoll fails
    https://git.kernel.org/netdev/net-next/c/908ee298c8fb

You are awesome, thank you!