All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yohei Kojima <yk@y-koj.net>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Yohei Kojima <yk@y-koj.net>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
	Breno Leitao <leitao@debian.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH net v3 0/2] net: netdevsim: fix inconsistent carrier state after link/unlink
Date: Tue,  6 Jan 2026 00:17:31 +0900	[thread overview]
Message-ID: <cover.1767624906.git.yk@y-koj.net> (raw)

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/

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/

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


             reply	other threads:[~2026-01-05 15:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 15:17 Yohei Kojima [this message]
2026-01-05 15:17 ` [PATCH net v3 1/2] net: netdevsim: fix inconsistent carrier state after link/unlink Yohei Kojima
2026-01-05 15:17 ` [PATCH net v3 2/2] selftests: netdevsim: add carrier state consistency test Yohei Kojima
2026-01-07  2:30 ` [PATCH net v3 0/2] net: netdevsim: fix inconsistent carrier state after link/unlink patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1767624906.git.yk@y-koj.net \
    --to=yk@y-koj.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.