mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC net-next 0/2] tipc: notify pending connects of peer node loss
@ 2026-09-29  6:47 liushike
  2026-09-29  6:47 ` [RFC net-next 1/2] tipc: abort pending connects when the peer node is lost liushike
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: liushike @ 2026-09-29  6:47 UTC (permalink / raw)
  To: netdev
  Cc: jmaloy, tung.quang.nguyen, davem, edumazet, kuba, pabeni, horms,
	shuah, tipc-discussion, linux-kselftest, linux-kernel

From: liushike <liushike@ruijie.com.cn>

This series notifies pending active opens when contact with the peer node
is lost, and adds selftests for both connection-oriented socket types.

A client can send SYN and wait in connect() while the listening server
has not called accept(). If the last usable link then disappears, the
unmodified kernel leaves that connect waiting instead of reporting node
loss. Registering pending connects lets node_lost_contact() notify them;
the client receives EHOSTUNREACH. A surviving link preserves the attempt.

Patch 1 changes connection registration and error notification. Patch 2
adds selftests and their build/maintainer integration.

I am proposing net-next for this long-standing behavior change, but would
appreciate guidance on whether net is the preferred target. This is an
RFC for review, including the target tree and historical attribution.

I have not reliably identified the original introducing commit for a
Fixes tag. Commit dadebc00299a ("tipc: eliminate port_connect()/port_disconnect()
functions") moved existing registration logic in 2014; its parent already
registered at connection completion, so that refactoring alone is not
evidence of introduction. No Fixes tag is guessed here.

Testing used the base-commit below for the before kernel and that base
plus this series for the after kernel. Both ran the identical final
selftest in x86_64 QEMU/KVM guests (2 vCPUs, 1536 MiB), with GCC 9.4.0
and binutils 2.34. Two network namespaces communicate over veth pairs;
fault injection disables TIPC Ethernet bearers, not physical cables.

Results (SOCK_STREAM and SOCK_SEQPACKET, nine cases each):
  Before: 8 passed, 10 failed, 0 skipped; exit status 1.
  After: 18 passed, 0 failed, 0 skipped; exit status 0.

On the before kernel, last-link loss, both-links loss and named node loss
left connect pending beyond the two-second assertion window. Nonblocking
connect and connection-wait timeout followed by node loss had no hangup
event and SO_ERROR remained zero. Normal accept, surviving-link failover,
rejection and named accept passed. These failures occurred after SYN
reached the listener, not during topology preparation.

On the after kernel all cases passed, including EHOSTUNREACH and POLLHUP
checks for asynchronous failure. The two-second bound is a test deadline,
not a measurement of millisecond-level latency.

The kernel configurations differ only in CONFIG_LOCALVERSION. The build
records include the base commit, patch and image hashes, configurations,
compiler output, launch script and both guest TAP logs.

liushike (2):
  tipc: abort pending connects when the peer node is lost
  selftests: net: cover pending TIPC connects on peer node loss

 MAINTAINERS                                 |   1 +
 net/tipc/node.c                             |  37 ++-
 net/tipc/node.h                             |   1 +
 net/tipc/socket.c                           |  38 ++-
 tools/testing/selftests/net/Makefile        |   1 +
 tools/testing/selftests/net/config          |   1 +
 tools/testing/selftests/net/tipc_connect.py | 278 ++++++++++++++++++++
 7 files changed, 353 insertions(+), 4 deletions(-)
 create mode 100755 tools/testing/selftests/net/tipc_connect.py


base-commit: 8830e65ed46de41f849eefb8ba227d4852c460f6
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-29  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29  6:47 [RFC net-next 0/2] tipc: notify pending connects of peer node loss liushike
2026-09-29  6:47 ` [RFC net-next 1/2] tipc: abort pending connects when the peer node is lost liushike
2026-09-29  6:47 ` [RFC net-next 2/2] selftests: net: cover pending TIPC connects on peer node loss liushike
2026-09-29  6:54 ` [RFC net-next 0/2] tipc: notify pending connects of " netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®