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
>
. 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
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
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
17 matches
Mail list logo