* [PATCH net] selftests: netconsole: only restore MAC when it changed on resume
@ 2026-07-10 22:19 Andre Carvalho
2026-07-11 15:34 ` Matthieu Baerts
0 siblings, 1 reply; 2+ messages in thread
From: Andre Carvalho @ 2026-07-10 22:19 UTC (permalink / raw)
To: Breno Leitao, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel, matttbe, Andre Carvalho
The "mac" bind mode reactivation downs the interface, restores the saved
MAC and renames it to trigger a target resume. This assumes the recreated
interface comes back with a different MAC, which is true under
MACAddressPolicy=none (as on the Netdev CI) but not when MACs are
persistent. In the persistent case netconsole resumes the target on its
own, and the down/restore/rename flow instead drops it and fails the test.
Guard the block on the MAC having actually changed so the test passes
under both policies.
Fixes: 6ecc08329bab ("selftests: netconsole: validate target resume")
Reported-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Closes: https://lore.kernel.org/netdev/f398373e-2cb4-4649-a491-9763df94d98b@kernel.org/
Signed-off-by: Andre Carvalho <asantostc@gmail.com>
---
tools/testing/selftests/drivers/net/netconsole/netcons_resume.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/drivers/net/netconsole/netcons_resume.sh b/tools/testing/selftests/drivers/net/netconsole/netcons_resume.sh
index cb59cf436dd0..d9111f2102bc 100755
--- a/tools/testing/selftests/drivers/net/netconsole/netcons_resume.sh
+++ b/tools/testing/selftests/drivers/net/netconsole/netcons_resume.sh
@@ -44,7 +44,8 @@ function trigger_reactivation() {
# Restore MACs
ip netns exec "${NAMESPACE}" ip link set "${DSTIF}" \
address "${SAVED_DSTMAC}"
- if [ "${BINDMODE}" == "mac" ]; then
+ if [ "${BINDMODE}" == "mac" ] &&
+ [ "$(mac_get "${SRCIF}")" != "${SAVED_SRCMAC}" ]; then
ip link set dev "${SRCIF}" down
ip link set dev "${SRCIF}" address "${SAVED_SRCMAC}"
# Rename device in order to trigger target resume, as initial
---
base-commit: 1cd23ca80784223fa2204e16203f754da4e821f8
change-id: 20260710-netcons-mac-reload-f6f5e86f9e1f
Best regards,
--
Andre Carvalho <asantostc@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] selftests: netconsole: only restore MAC when it changed on resume
2026-07-10 22:19 [PATCH net] selftests: netconsole: only restore MAC when it changed on resume Andre Carvalho
@ 2026-07-11 15:34 ` Matthieu Baerts
0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2026-07-11 15:34 UTC (permalink / raw)
To: Andre Carvalho
Cc: netdev, linux-kselftest, linux-kernel, Breno Leitao, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan
Hi Andre,
On 11/07/2026 00:19, Andre Carvalho wrote:
> The "mac" bind mode reactivation downs the interface, restores the saved
> MAC and renames it to trigger a target resume. This assumes the recreated
> interface comes back with a different MAC, which is true under
> MACAddressPolicy=none (as on the Netdev CI) but not when MACs are
> persistent. In the persistent case netconsole resumes the target on its
> own, and the down/restore/rename flow instead drops it and fails the test.
>
> Guard the block on the MAC having actually changed so the test passes
> under both policies.
Thank you for the patch, it fixed the issue on my side when not forcing
MACAddressPolicy=none.
Tested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Cheers,
Matt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-11 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 22:19 [PATCH net] selftests: netconsole: only restore MAC when it changed on resume Andre Carvalho
2026-07-11 15:34 ` Matthieu Baerts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox