From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312360; b=he2eQr1hmDjOpv9cudyFDaxb+NGIlIGRpT37RleFyk/Wg65eYapaZSo4hU/SOhrd3s0n Rya0ViXHclgwbMtaz5Htm8AwWDPWwp/5f8oCMMvZrZct+KNGreQ+gS5+0J//al24RB3UC bkcmyABpFUTmZMYiMppvNFX9hYG7K5KqhLBCyQ8rGcp+4SpLroAFEDUZ7AA5iH+3pYSHm gb9+tZtMFUTglhbq6/y+nZq6Z9HZCAYZFGtvwzsHNnpa8wrTuX4atrBCH1hDc0FH7uGGd CyyIHGCVjL+BwLcPN0kVXuiOgFu4WtTnRJ/yqxx2LafpxyCKZmh3BsjTBI+RJ1sz0Tw== 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=TnHJMOLD0ov07myiAh2JPbM6Qf4QZO6NjvVWHrVweqq5N7okGlvGYGKDvL99vO+CjJo1 VBO3OeavMCF2rllwlV1uaDoQPwTAwVMoFNvbx0gC5UoGij1mM5CiwQLg0uVlp81sjQDCc IbzzU8s/5eFulf+0WxYKEgFsZnKc0NQjRaHVsiOXMdo16YcvybBrWuf3n7Iq/nQnB7OY+ 7dXuzmPBR8fSonmAeKPuGWujFugMI0jo8HtAIGrE/EZePT2A+qASWkn8ab8q2BpkXgIP6 SGsgY2qqsAPnKzecKZQEwTR5Ql8+EwYkUni0X9CK5ufSzJMerHSKyYyV0pEiDqgBiWA== 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.175 Received: from mail-dy1-f175.google.com (mail-dy1-f175.google.com [74.125.82.175]) (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 21C66606A32D for ; Thu, 3 Dec 2026 15:39:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21C66606A32D 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-dy1-f175.google.com with SMTP id 5a478bee46e88-38190551625so26463607eec.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=RFrUEYQkOp6Yqs86nRvpcb/sUTS2HsIUIQ7nSnNirMxel0YA9BNRBsQPpfwr7TntqZ 3qrgdlWFpZuLkPYJCjsR4dqf2eEVzhJuuvKASX2lOVzmRVeiqFcXpA/yDHPnl7+eJEJM oqTAKzTsrZn5Car9pwxz6L7cBzNU1CZt0HBelF2L5xhJaizOOZFRjTy1ltAz/gbQFNlF U3QAOsDVuzCtqciGYbECIuAxphUqXV8MOMp0cQK6qsB5BisXnBMJ9R/pmw4Ho321CNQe dmeoz27mhBy4in3MneYY98OoykFdgztTJnKxh/aIYWXsWKES/IOB3tgneLi8qlb1Km0l 3g1w== X-Forwarded-Encrypted: i=1; AL+hErESkMewcCIX/E41ntJr90HqfCC141nIIWas9lCbcezGZzVVlViuCIc7AZipvIDIzd7GmG1VeoE=@vger.kernel.org X-Gm-Message-State: APuU4Z88Uio4VdygRQ6j+htVkLgaAonefIyRIcJFndUSNHT31Ew279wH OJTY7j3J7PQ6c44Bppej9EI5xjp66TiJFio0e97SZjE9PdvoFFochCH5 X-Gm-Gg: AZFdTZdluSmjRq+4yE4zOmneKviUInOnAJ3Y2wzvkEGqqqC3+pep2+VTu/BKPJThVpz MPIGLdhH0VoW4+wGWmybzVbgn8iHuXiCxPs27hFllnLaBOdA4MUpSJxHznvdJLhSZV7CLsgPmXE 0Yk4CjFxpx0305c9O3VO46BEuMolzftXDbQBKwX7xm0eFNX6QeqEwwQT0JK1IF4W7r7b+EmVjXF R+gBGaT3qAkMYJIA+Qr6w86h1k4w2OqLUD4cvesfaCsnfCgoA6LDek2+nWOkg3v+asS1hoyy9YY pzgEyBDicTV8YYteQpAz+2+gIVGEjgF9QiBwXF+QgvowSQziIOXIqSB67fS5Hqrp2TL5VJChFhI UlrBxdTklidg5jGGA5XJKEeIpcrVonLRLC03wHU2HVyV0Zy0nsx505kUmTC/E4A3Tzj8+5Awypy QhGNsiOQfnyClo8zoAARdW65wly5LJks295NjAFve7YO1jHLIZ0AC5xFNWqFY4cowIvgeKYENT8 teNXidg5SXSHghDLgG/tHxsa5PzJNPiI1/x4lDGQWQbblpJR7X8p3QjMJz3DGIGoa294cd/uXvd jz2EAJGHUXS+ECk+IIWH9ioIp1dlea1xvs1/6pTYMkhyyasrIhg7tekMmifNf/49vcT1qsys7ac PA7uTbaoUQfOn2b+l8g== 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: netdev@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