Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Ermenson Junior <ermenson.sec@gmail.com>
To: alibuda@linux.alibaba.com, dust.li@linux.alibaba.com,
	sidraya@linux.ibm.com, mjambigi@linux.ibm.com
Cc: tonylu@linux.alibaba.com, guwen@linux.alibaba.com,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, willemb@google.com, horms@kernel.org,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-s390@vger.kernel.org
Subject: [PATCH net-next v2 0/4] net/smc: stop a silent peer stalling every server handshake
Date: Thu,  3 Dec 2026 12:35:10 -0300	[thread overview]
Message-ID: <20261203153514.1440337-1-ermenson.sec@gmail.com> (raw)

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


             reply	other threads:[~2026-12-03 15:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 15:35 Ermenson Junior [this message]
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

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=20261203153514.1440337-1-ermenson.sec@gmail.com \
    --to=ermenson.sec@gmail.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@kernel.org \
    --cc=guwen@linux.alibaba.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjambigi@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sidraya@linux.ibm.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=willemb@google.com \
    /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