Thread (4 messages) 4 messages, 2 authors, 2026-01-07
STALE185d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH net v3 0/2] net: netdevsim: fix inconsistent carrier state after link/unlink

From: Yohei Kojima <hidden>
Date: 2026-01-05 15:18:18
Also in: linux-kselftest, lkml

This series fixes netdevsim's inconsistent behavior between carrier
and link/unlink state.

More specifically, this fixes a bug that the carrier goes DOWN although
two netdevsim were peered, depending on the order of peering and ifup.
Especially in a NetworkManager-enabled environment, netdevsim test fails
because of this.

The first patch fixes the bug itself in netdevsim/bus.c by adding
netif_carrier_on() into a proper function. The second patch adds a
regression test for this bug.

Changelog
=========
v2 -> v3:
- Rebase to the latest net/main
- patch 1:
  - Add Reviewed-by tag from Breno Leitao
  - Address the review comments from Jakub Kicinski regarding the condition
    to call netif_carrier_on()
- patch 2:
  - Solve the shellcheck warning in the test
    - Line too long error is left as is for consistency with other test
      cases
- v2: https://lore.kernel.org/netdev/cover.1767108538.git.yk@y-koj.net/ (local)

v1 -> v2:
- Rebase to the latest net/main
- Separate TFO tests from this series
- Separate netdevsim test improvement from this series
- v1: https://lore.kernel.org/netdev/cover.1767032397.git.yk@y-koj.net/ (local)

Yohei Kojima (2):
  net: netdevsim: fix inconsistent carrier state after link/unlink
  selftests: netdevsim: add carrier state consistency test

 drivers/net/netdevsim/bus.c                   |  8 +++
 .../selftests/drivers/net/netdevsim/peer.sh   | 59 +++++++++++++++++++
 2 files changed, 67 insertions(+)

-- 
2.51.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help