Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] net/smc: stop a silent peer stalling every server handshake
@ 2026-12-03 15:35 Ermenson Junior
  2026-12-03 15:35 ` [PATCH net-next v2 1/4] net/smc: bound the SMC-Rv1 add-link rkey exchange Ermenson Junior
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ermenson Junior @ 2026-12-03 15:35 UTC (permalink / raw)
  To: alibuda, dust.li, sidraya, mjambigi
  Cc: tonylu, guwen, davem, edumazet, kuba, pabeni, willemb, horms,
	netdev, linux-rdma, linux-s390

v1: https://lore.kernel.org/netdev/20261202131243.664308-1-ermenson.sec@gmail.com/

v1 serialized per peer with a mutex hashed on proposal fields. Mahanta
asked what a duplicate link group costs and said he would rather see the
exact fix. The Sashiko bot found the hash reading the IP prefix area as
a gid for an SMCv1 proposal. v2 drops the hash and takes the exact
route.

To answer the question in the archive: a duplicate link group is
harmless for correctness, because the ACCEPT carries first_contact_local
and the client creates a matching group, and because a group at
max_conns already makes the server create siblings today. It is not free
in resources: lgr_cnt is a counter and not a cap, and an idle server
group is held SMC_LGR_FREE_DELAY_SERV, 600 seconds.

The series grew to four patches because of the bot's other point. Patch
4 takes the whole of smc_listen_rdma_finish() out from under the global
mutex, including the first-contact ADD_LINK phase, and a joining
connection of the same peer can then block on rmbs_lock or
llc_conf_mutex with no timeout while holding that mutex. Patches 1 and 2
bound the flow it would be waiting on, so they come first. Patch 3 fills
a new link's peer gid and mac at creation, which patch 4 needs because
the new match compares them before the CONFIRM arrives.

Patches 1 and 2 stand alone and fix the High issue the bot raised on v1
as pre-existing.

Ermenson Junior (4):
  net/smc: bound the SMC-Rv1 add-link rkey exchange
  net/smc: check the ADD_LINK_CONT send result in the server rkey
    exchange
  net/smc: set a new link's peer gid and mac at creation
  net/smc: drop smc_server_lgr_pending across the CLC CONFIRM wait

 net/smc/af_smc.c   |  46 ++++++++---
 net/smc/smc_core.c | 191 +++++++++++++++++++++++++++++++++++++++++++++
 net/smc/smc_core.h |  21 +++++
 net/smc/smc_llc.c  |  58 ++++++++++++--
 net/smc/smc_llc.h  |   7 ++
 5 files changed, 304 insertions(+), 19 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-12-03 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 15:35 [PATCH net-next v2 0/4] net/smc: stop a silent peer stalling every server handshake Ermenson Junior
2026-12-03 15:35 ` [PATCH net-next v2 1/4] net/smc: bound the SMC-Rv1 add-link rkey exchange Ermenson Junior
2026-12-03 15:35 ` [PATCH net-next v2 2/4] net/smc: check the ADD_LINK_CONT send result in the server " Ermenson Junior
2026-12-03 15:35 ` [PATCH net-next v2 3/4] net/smc: set a new link's peer gid and mac at creation Ermenson Junior
2026-12-03 15:35 ` [PATCH net-next v2 4/4] net/smc: drop smc_server_lgr_pending across the CLC CONFIRM wait Ermenson Junior

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