Skip to content

net: netdevsim: fix inconsistent carrier state after link/unlink

Yohei Kojima linux-kselftest lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesApplied 2/2
  2. v22 patches 4 repliesSuperseded
  3. v15 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- 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/[email protected]/

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: netdevsim: fix inconsistent carrier state after link/unlinkdrivers/net/netdevsim/bus.c+8 -00 repliesApplied
2/2selftests: netdevsim: add carrier state consistency testtools/testing/selftests/drivers/net/netdevsim/peer.sh+59 -00 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchBreno Leitao
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

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/[email protected]/

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/[email protected]/

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(+)
Signature · 1 line
2.51.2