netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yk@y-koj.net
To: Jakub Kicinski <kuba@kernel.org>, netdev@vger.kernel.org
Cc: Yohei Kojima <yk@y-koj.net>, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
	Simon Horman <horms@kernel.org>, Breno Leitao <leitao@debian.org>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH net 0/5] net: netdevsim: fix inconsistent carrier state after link/unlink
Date: Tue, 30 Dec 2025 03:32:33 +0900	[thread overview]
Message-ID: <cover.1767032397.git.yk@y-koj.net> (raw)

From: Yohei Kojima <yk@y-koj.net>

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 and third patches
clean up netdevsim test and add a regression test for this bug.

The fourth and fifth patches improve TCP Fast Open (TFO) test, which
depends on netdevsim. In a NetworkManager-enabled environment, although
TFO test times out because of this bug, the test exits with 0 without
reporting any error.  This behavior implies that nothing would be
reported even if TFO got broken at some point.

The fourth and fifth patches are intentionally placed after the first
patch, because fixing TFO test without fixing netdevsim results in
a spurious test failure in a NetworkManager-enabled environment.

Yohei Kojima (5):
  net: netdevsim: fix inconsistent carrier state after link/unlink
  selftests: netdevsim: test that linking already-connected devices
    fails
  selftests: netdevsim: add carrier state consistency test
  selftests: net: improve error handling in TFO test
  selftests: net: report SKIP if TFO test processes timed out

 drivers/net/netdevsim/bus.c                   |  6 ++
 .../selftests/drivers/net/netdevsim/peer.sh   | 79 ++++++++++++++++++-
 tools/testing/selftests/net/tfo.c             | 10 ++-
 tools/testing/selftests/net/tfo_passive.sh    | 15 +++-
 4 files changed, 101 insertions(+), 9 deletions(-)

-- 
2.51.2


             reply	other threads:[~2025-12-29 18:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29 18:32 yk [this message]
2025-12-29 18:32 ` [PATCH net 1/5] net: netdevsim: fix inconsistent carrier state after link/unlink yk
2025-12-29 18:39   ` Andrew Lunn
2025-12-29 19:56     ` Yohei Kojima
2025-12-30 11:02       ` Andrew Lunn
2025-12-30 16:20         ` Yohei Kojima
2025-12-29 18:32 ` [PATCH net 2/5] selftests: netdevsim: test that linking already-connected devices fails yk
2025-12-29 18:32 ` [PATCH net 3/5] selftests: netdevsim: add carrier state consistency test yk
2025-12-29 18:32 ` [PATCH net 4/5] selftests: net: improve error handling in TFO test yk
2025-12-29 18:32 ` [PATCH net 5/5] selftests: net: report SKIP if TFO test processes timed out yk

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.1767032397.git.yk@y-koj.net \
    --to=yk@y-koj.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).