From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312360; b=w9Xpt9VvKsUEx146fAZFHIz7qqPP6itGwKbEGRB0Iqkhvch59QH6Q4phYy7NJL9I2tcT VaV9TaSDYP6HoK4z4mIu/eRYAFloeZSVOpPc2ZhCBWsP/FURHw54fILc2OoITra6TDjRi xSFAP2q8sgXSjLhc6ri+3wb04Cgy1fzQNma3BqxIpLAV8xljf+pf5clsY0b/5FB0OrmHi GKNwvokRevjTyUzKfp5ViQgi/tLY0XKJn+3g/wxTewDeFFolwvsqrql5Qj2lyxGnkh3QD zKfWYxZ4DAluDimOQNtuX0pifjhPPNWSo/Qm5FcfFP26z6eY7i8iQZ2goXch3gT8Bpg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312360; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=fUHldWRDcr4SrdnWgQkN+VYVuQIoUcILNhxJ92Lzkbw=; b=hxDAOUdwzjTc+bRM7MC0Ob5CMNO2q255FtdLgnwJG+U/EM7JTH6jzSPAeNA71/z7IG7j 5bmil1jq0ebKT3RFOhi9zijq4S0NwLfYHLop6AM4OCJAPFrUyv+cWWHN5lW2CMjspQJAq BMFcKSYBy4QqDvbcn20vpcorbIJNen8Wjbm/6HZbdCV3/CP8XuzI5zE6Ic0VFHulZVxe6 DnoNFSnRIDh35EdgCd+mqSPjQipGso6ntgGvCvJFJYPGDR2wnf8qBO/NxAB+fgrQIjeve K878LVVKU0RaRi+RXVKLzX0Y80ST9IOr8qL3FIDDolA0axkKeFC9BEo62GQEbWC/P1g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=chMfBIj+; arc=none smtp.remote-ip=74.125.82.44 Received: from mail-dl1-f44.google.com (mail-dl1-f44.google.com [74.125.82.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1ED4D606A32C for ; Thu, 3 Dec 2026 15:39:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1ED4D606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=chMfBIj+ Received: by mail-dl1-f44.google.com with SMTP id a92af1059eb24-1b563e32936so10153691c88.1 for ; Thu, 03 Dec 2026 07:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796312359; x=1796917159; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=fUHldWRDcr4SrdnWgQkN+VYVuQIoUcILNhxJ92Lzkbw=; b=chMfBIj+TDSSvhExuNkiAsvIAuxsBVD91/A/Uqg5tR7aPTqFlRJlNhSBmQXQKI037p KHgyIkttC5lmfjOREpssdmBWXVI0vGbOx4KR9SO9w+l+AZOMmWyE7X6sHtIpUoB4jl+v V1L4jdk65Q38X3c+IxfZyQcrSLy9g6iN7JLqdpa8hWDkLRdf/oolxwArHlbk6vYKBJlg wGbOnUzHACi6r5IrS3agSCmGApT9+uATGcwqNNG03DqTy0GmWiITEMsYV+XMiQq00EFK TK0UvQ9pQkONu6P7jS5PqN0121g5f7ELlAUl7GOWGOg71Msbr4bZyFnreficr6kCL0hv TqHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796312359; x=1796917159; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=fUHldWRDcr4SrdnWgQkN+VYVuQIoUcILNhxJ92Lzkbw=; b=EG9WzpcPrVW5bmni1S9Nx17FLhSKRW6eGvaiZ6L4jzfORjbPu9Xvb6Jz4pK1BKMxfd bcbyYcwhSuKTTH1q2acFlw3njEnIlrkY1ygHsImNWKDXy6z6/nbx0kxCIWX0d3pXgd55 MCkBBjS+pZvc3PcIswgd/UeotcaLtn4QrhYiYQSRYN1lmVjWWMZuoqYtv6nyKqMgED3h hJ32RxrxUuPoHKky16GzgEFk17hkr+OM+QN6rMQ1uK8x7IXRFKV+etlB0j0yaVAjzF3Z Z/aVXHSCePovwz0X4f7geQI5ID0/Q6dD8rXMeSjVD5j8c/BFGoAjKgL99Ps6IASj86dh 1KwA== X-Forwarded-Encrypted: i=1; AL+hErFjas+aQqzXFzaP8UW9reCx81ha172EN2H95zwVyMq1pH5aBXcyVO5HtdbDczCIojEA3H8f0rL5m1Yd@vger.kernel.org X-Gm-Message-State: APuU4Z9fU7RTevay34DYOpr0lLPQGZ8xNvsXS4TCOiVuELnL6+dRZzyd WGZ6obgW88XjpGzu1nQJdFozPIYjeX3KUnNBsJpH5I777Moph8lAzSRV X-Gm-Gg: AZFdTZcmjaDnxLR3pZq/ucXvsB5Xj91Nj0LZvrhOn/gorlXhoUWjJjA3+IpKcdQd0Ni a8DHNh9KSESua/jOTiekWuqfpffW0vG2yS612p0ZOlEo0VJc813Yag4Ow2pWBvtGVsYop/NWNg5 zMx2oqeDGplUe+jjKJl7IWqPw+slBIpko5WK0mRUjrPmowdyhHn4tWhzkPkBZQocA3KUfpWw9gN 9VC3y+2XRoqLsicxkpYlfPiG7aprnvo6AuqDFm6L7e8WsQOGgTwGYBPAjUbpgYxj8RQumH80FRk fnOCAn29LoUB8eBf82ggAQ+vYwMJHM2bZxyxMrDWvPENbj1869tGS6Of1owKtJSFMUXdRNhQYNR 4G6+WgehIbTLbwAZGExl3Ixw7HnKB1BcpoIuDDYYxwvfo6MJfmr1a+jqMYiRQep5lROVEue1WsP PoH1OogckDqhGUuGnLtqS88e5huy+cfU1NagN6ielTsSUqmEsUFzScdzqd0OhTKsC1wsQZoTNFo fwIU7lBPMI1pe8NaPpCo6MkUU0BMlEQfDFeOGvoIZh3g/VMDQO4PWdLJwWka988QUnqRsZCxjcc GyO0IPh1ulroKWIORhlLgEXi6RHefRTciTCXQ73BLmaPRb9jNXhTqxjKKk8Wpopg4zKQGMf+bKj eFwl799O0+YUvuPDykg== X-Received: by 2002:a05:701b:450d:20b0:185:fd0c:4585 with SMTP id a92af1059eb24-1b558384c12mr39305119c88.33.1796312358879; Thu, 03 Dec 2026 07:39:18 -0800 (PST) Received: from zorinLS.. ([2804:19c:2591:7000:8394:f950:9202:6c9b]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b562a82b3fsm129329352c88.5.2026.12.03.07.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 07:39:18 -0800 (PST) From: Ermenson Junior 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 Message-ID: <20261203153514.1440337-1-ermenson.sec@gmail.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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