Re: [PATCH net-next v2 5/6] netconsole: resume previously deactivated target

2025-09-27 Thread Andre Carvalho
Hi Breno, On Tue, Sep 23, 2025 at 05:22:25AM -0700, Breno Leitao wrote: > For targets that are set by the mac address, they don't necessarily get > np.dev_name populated, do they? > > I am double checking netpoll_setup(), and if > is_valid_ether_addr(np->dev_mac), I don't see np.dev_name being >

[PATCH net-next v2 6/6] selftests: netconsole: validate target reactivation

2025-09-21 Thread Andre Carvalho
. Afterwards, the test validates that the target works as expected. Targets are created via cmdline parameters to the module to ensure that resuming works for targets bound by interface name and mac address. Signed-off-by: Andre Carvalho --- tools/testing/selftests/drivers/net/Makefile | 1

[PATCH net-next v2 5/6] netconsole: resume previously deactivated target

2025-09-21 Thread Andre Carvalho
transitions to STATE_DISABLED in case of failures resuming it to avoid retrying the same target indefinitely. Signed-off-by: Andre Carvalho --- drivers/net/netconsole.c | 38 ++ 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/net/netconsole.c b

[PATCH net-next v2 4/6] netpoll: add wrapper around __netpoll_setup with dev reference

2025-09-21 Thread Andre Carvalho
setup netpoll in response to a NETDEV_UP event. Since netconsole always perform cleanup using netpoll_cleanup, this will ensure that reference counting is correct and handled entirely inside netpoll. Signed-off-by: Andre Carvalho --- include/linux/netpoll.h | 1 + net/core/netpoll.c | 20

[PATCH net-next v2 2/6] netconsole: convert 'enabled' flag to enum for clearer state management

2025-09-21 Thread Andre Carvalho
This patch refactors the netconsole driver's target enabled state from a simple boolean to an explicit enum (`target_state`). This allow the states to be expanded to a new state in the upcoming change. Co-developed-by: Breno Leitao Signed-off-by: Breno Leitao Signed-off-by: Andre Car

[PATCH net-next v2 1/6] netconsole: add target_state enum

2025-09-21 Thread Andre Carvalho
From: Breno Leitao Introduces a enum to track netconsole target state which is going to replace the enabled boolean. Signed-off-by: Breno Leitao Signed-off-by: Andre Carvalho --- drivers/net/netconsole.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/netconsole.c b

[PATCH net-next v2 0/6] netconsole: support automatic target recovery

2025-09-21 Thread Andre Carvalho
due to interfaces going down). It then modifies netconsole to handle NETDEV_UP events for such targets and setups netpoll. The patchset includes a selftest that validates netconsole target state transitions and that target is functional after resumed. Signed-off-by: Andre Carvalho --- Changes in v2

Re: [PATCH net-next 4/5] netconsole: resume previously deactivated target

2025-09-11 Thread Andre Carvalho
On Wed, Sep 10, 2025 at 12:50:07PM -0700, Breno Leitao wrote: > > + if (nt->state == STATE_DEACTIVATED && event == NETDEV_UP) { > > + if (!strncmp(nt->np.dev_name, dev->name, IFNAMSIZ)) > > Don't you need to check for dev_mac here as well? I believe so. Will fix that

[PATCH net-next 5/5] selftests: netconsole: validate target reactivation

2025-09-09 Thread Andre Carvalho
. Afterwards, the test validates that the target works as expected. Signed-off-by: Andre Carvalho --- tools/testing/selftests/drivers/net/Makefile | 1 + .../selftests/drivers/net/lib/sh/lib_netcons.sh| 23 .../selftests/drivers/net/netcons_resume.sh| 68

[PATCH net-next 4/5] netconsole: resume previously deactivated target

2025-09-09 Thread Andre Carvalho
Attempt to resume a previously deactivated target when the associated interface comes back (NETDEV_UP event is received). Target transitions to STATE_DISABLED in case of failures resuming it to avoid retrying the same target indefinitely. Signed-off-by: Andre Carvalho --- drivers/net

[PATCH net-next 2/5] netconsole: convert 'enabled' flag to enum for clearer state management

2025-09-09 Thread Andre Carvalho
This patch refactors the netconsole driver's target enabled state from a simple boolean to an explicit enum (`target_state`). This allow the states to be expanded to a new state in the upcoming change. Co-developed-by: Breno Leitao Signed-off-by: Breno Leitao Signed-off-by: Andre Car

[PATCH net-next 3/5] netconsole: add STATE_DEACTIVATED to track targets disabled by low level

2025-09-09 Thread Andre Carvalho
ode perspective. Signed-off-by: Breno Leitao Signed-off-by: Andre Carvalho --- drivers/net/netconsole.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 688ed670b37b56ab4a03d43fb3de94ca0e6a8

[PATCH net-next 1/5] netconsole: add target_state enum

2025-09-09 Thread Andre Carvalho
From: Breno Leitao Introduces a enum to track netconsole target state which is going to replace the enabled boolean. Signed-off-by: Breno Leitao Signed-off-by: Andre Carvalho --- drivers/net/netconsole.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/netconsole.c b

[PATCH net-next 0/5] netconsole: support automatic target recovery

2025-09-09 Thread Andre Carvalho
This patch series introduces target resume capability to netconsole allowing it to recover targets when underlying low-level interface comes back online. Signed-off-by: Andre Carvalho --- Andre Carvalho (3): netconsole: convert 'enabled' flag to enum for clearer state

Re: [PATCH net-next v2 2/2] selftest: netcons: create a torture test

2025-09-05 Thread Andre Carvalho
On Thu, Sep 04, 2025 at 11:00:41AM -0700, Breno Leitao wrote: > +# This test aims verify the robustness of netconsole under dynamic > +# configurations and concurrent operations. Just a small nit: "aims to verify" or simply "verifies". Reviewed-by: Andre Carvalho

[PATCH net-next v2] selftests: netconsole: Validate interface selection by MAC address

2025-08-12 Thread Andre Carvalho
Signed-off-by: Andre Carvalho --- Changes in v2: - Redirect log line to stderr - Do not ignore error unloading the module between test cases - Remove nested quotes when building cmdline for module - Format comments to avoid exceeding 80 columns - Link to v1: https://lore.kernel.org/r/20250811-netcons

[PATCH net-next] selftests: netconsole: Validate interface selection by MAC address

2025-08-11 Thread Andre Carvalho
Extend the existing netconsole cmdline selftest to also validate that interface selection can be performed via MAC address. The test now validates that netconsole works with both interface name and MAC address, improving test coverage. Suggested-by: Breno Leitao Signed-off-by: Andre Carvalho