Article View: linux.kernel.netdev
Article #19108Re: [PATCH net v7 2/3] net/smc: bound the peer rkey counts in SMC-Rv2 LLC messages
From: Yehyeong Lee
Date: Thu, 19 Nov 2026 10:53
Date: Thu, 19 Nov 2026 10:53
31 lines
12775 bytes
12775 bytes
Three of the points above are about code this series did not add. Where they stand on current mainline: - The memcpy() into lgr->wr_rx_buf_v2 is gone. 3/3 made smc_llc_rmt_delete_rkey() read the queue entry instead, and nothing on the CPU writes to that buffer any more. - The v2 spillover buffer is still shared by every receive WR of the link group. 3/3 narrowed the window to the copy in smc_llc_rx_handler(), but if two LLC messages with extensions arrive before the receive tasklet runs, the first one's tail can already be overwritten by the second when it is copied. The result is the wrong rkeys being processed for the same peer; the copy stays inside the 8 KiB buffer. Closing it needs a spillover buffer per WR or per link, which gives back the memory 27ef6a9981fe saved, so I am leaving that decision to you. - smc_rtoken_delete() runs without rmbs_lock, and so do smc_rtoken_add() and smc_rtoken_set2() in smc_llc_rmt_conf_rkey() and smc_rtoken_add() on the CLC path; only the three smc_rtoken_set() callers take it. As far as I can tell from smc_llc_flow_start(), a remote DELETE_RKEY flow is not held back by a local ADD_LINK flow, so it can clear an rtoken slot while smc_llc_save_add_link_rkeys() is filling that table. The rtokens are a fixed array, so this ends in a lost or mismatched rkey rather than a memory error. Taking the lock in the LLC event path is not a one-line change either: smc_llc_cli_rkey_exchange() and smc_llc_srv_rkey_exchange() hold it for writing across smc_llc_wait(). Best regards, Yehyeong Lee
Technical Details
Message-ID:
<20261119105308.2567241-2-yhlee@isslab.korea.ac.kr>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366960-linux-kernel-netdev=dewy.ruReferences:
<20260819023306.644849-1-yhlee@isslab.korea.ac.kr> <20260819023306.644849-3-yhlee@isslab.korea.ac.kr> <20260820023347.9D5461F00A3D@smtp.kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366960-linux-kernel-netdev=dewy.ru From: yhlee@isslab.korea.ac.kr (Yehyeong Lee) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v7 2/3] net/smc: bound the peer rkey counts in SMC-Rv2 LLC messages Date: Thu, 19 Nov 2026 19:53:08 +0900 Organization: Usenet Network Message-ID: <20261119105308.2567241-2-yhlee@isslab.korea.ac.kr> References: <20260819023306.644849-1-yhlee@isslab.korea.ac.kr> <20260819023306.644849-3-yhlee@isslab.korea.ac.kr> <20260820023347.9D5461F00A3D@smtp.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2853393"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:rG5LzFZmaYHiSBRNseIMKaJ9y7E= sha256:CnopxzrOVTXeG68bN7Tk4FZ8d5jfFI338FKred4pkyY= sha1:y/RLJP2AQHiBjHLg9lHbcZJBFfs= sha256:JX3eN6AsYRXKH7Sqw4eFQZ6aM092bzWBO/eSwG1nTZ4= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5CFBC1155D5; Thu, 19 Nov 2026 13:53:44 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.951 X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=isslab-korea-ac-kr.20260707.gappssmtp.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ffQrmOwQnAfE; Thu, 19 Nov 2026 13:53:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366960-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=isslab.korea.ac.kr X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A974A1155CF; Thu, 19 Nov 2026 13:53:31 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 0A6AC2628A4; Thu, 19 Nov 2026 10:53:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795085604; b=tWeu8RXFDWiEOQrbz4uu3sXvwHRrsuBFqn5KsEiiNoh8aofeTp8saOBN3FzrPVkB4d2G 089zZDFLZbstBxaq7Wg4wkWujWvghp17D3XLALipbHXH3lhNmP7jHeTjP+wA/9JvT11qT 6yhthf3Gy6iQkh9BadVC+0AI2GQ/r3XTY8nzHd7yPtUtv7mFXjOfwoQP7dcuxGUteCWCG JBDBXumtlk1BaIbKJxLH7oF4L2RCn6w+jJAH+I/L030Pyx0zF//pujAdprnMjT0yNW+tu gDGHokxkDhMbOXB2xBNiM9nK1KCwL+UJPt+x9kLpPCgHrPL/alwo4iYP4cVNfCdCqEg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795085604; h=X-Original-To:Received: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:In-Reply-To:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=u82m5XYfOkixN+Gu4sy3x8jwpD0ueQ6BxZtFc7iLOis=; b=rLO+MnYtknba2/6qFYEyOg8khs+c/1kkqPxMXbZeePRlaZZ8lj4/8JdPejzIjsKEDxi5 PVdqGgNGO+uBLUSW1MT3yEI5yRKMcyXTT6yBg7OLaauosyVUT0ckKsySlLs8sawWEjIJf OMhHRHPRJ/iqMEdPnbks1dbQRth6ny9/9hdopg627r+5ebfc8eKRnmUAY9cfokuIqO+FM GoNnuXIVFW9jbApR2x+SxKFhXci+buRPeMBq+EV+11hWwnUWtMDTjpC7qGv5dTYMVqg80 L/Y+Hb7n+fUKTkazrAmU4ybJ5U5bBbYoQNHUZUTNRp7aYTGPL1mDhdULRHXB6tx/3rA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=isslab-korea-ac-kr.20260707.gappssmtp.com header.i=@isslab-korea-ac-kr.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=iQ6rUIIV; dmarc=fail header.from=isslab.korea.ac.kr; spf=none smtp.mailfrom=isslab.korea.ac.kr; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 476CA606A32A; Thu, 19 Nov 2026 10:53:24 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=isslab-korea-ac-kr.20260707.gappssmtp.com header.i=@isslab-korea-ac-kr.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=iQ6rUIIV X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.171 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795085603; b=WCsHrjWuazELohdC7tOIpV4imIenB/WWnn4svJBK/Ug7iKn2VwcvLZ1QYHsOMBRB8Cec 5K9e/v+b3zxFhHsNG4li7AdWWJvGvshOstVV8940A2xeQvJysedQMzighPHZImUC0R9zF jCLupXKK1KJtzMY03gaQ4SEcNiBWXIEsQIlqfHg1BhMK6GlWTrD3SUtoCdqjrTQCiu31B pgJ8qRZYu/ZoeWVhM99B34IoanAOH8N6vzBLGF9Z8icYVmgJlK9IyPzmQISem/uK8DjV4 48b84k6m8tT3PicrF+qpNib2rXSbDao/MPSHhxDIFiSk6Hdh+2uKag2qaUFoHxQs/9w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795085603; 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:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=u82m5XYfOkixN+Gu4sy3x8jwpD0ueQ6BxZtFc7iLOis=; b=GPe0QsFfLWERyfeFng6353cLIwDt8CVeCKWPzfRJnR+JEH8Fx7xrU0evZiiB8JNTBdZJ UgLx7O8mjRU5LmH2ByJ8CzZCS/NsXxnNOGsIHSfan/TX2Vv3fHNQzhlQP5edZbIHpqtFC 32wNxTOwuC0Szay/j7cCi/rGmdw4uOH+6KqxSQcOANNJbJ3Gj2HzB1DbTbBkpKQCyUwGk 3YY0eTQtzrIYVwRINzvKDLynT7O2y2hdfygVvzAFtTYlZaJhtkvpH1UWLoyEODTgQua0m YmHa2n6QoxwamnRKLncHeunLdkC0i6UYwSyr9kdsbAhWe36Cf6cFojUKFETvIDpf2hw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=isslab.korea.ac.kr; spf=none smtp.mailfrom=isslab.korea.ac.kr; dkim=pass header.d=isslab-korea-ac-kr.20260707.gappssmtp.com header.i=@isslab-korea-ac-kr.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=iQ6rUIIV; arc=none smtp.remote-ip=209.85.215.171 X-Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 21002606A331 for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 10:53:23 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21002606A331 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=isslab.korea.ac.kr X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=isslab.korea.ac.kr X-Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-cde5a7d7849so185138a12.0 for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 02:53:23 -0800 (PST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isslab-korea-ac-kr.20260707.gappssmtp.com; s=20260707; t=1795085602; x=1795690402; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=u82m5XYfOkixN+Gu4sy3x8jwpD0ueQ6BxZtFc7iLOis=; b=iQ6rUIIV7M0UsUNIRA6NKN+GN+fSa8/ME/likVRUE5Bdb5g7Llp4kUXaNoFBFNOhBu F4l18R77EQ4LI3ORH9xbQFWnh3o6HuJKmiN0ciN6PEOTrv1IRf18GHrX2bRj/lKoek7t hmNB/zpCbM49xuUBktNQrmcoJ5zqomNzHzsqXTLF2iBDCAP6nsSVdeGU7R0jmF2GSPhS dA9NJl+y+nu6Ad8KkMo+5eCE9mSYpFxcvJTBEnQ55zbs6Y9UuJrshRrWTCo1cQhOwY1E z5WVZg6ZJLHx7WbdXSp0e5YnIwhwyAwlkQO8deuDe0o32wdEcvaysTjliRP98bQgfJOf 4VuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795085602; x=1795690402; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to: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=u82m5XYfOkixN+Gu4sy3x8jwpD0ueQ6BxZtFc7iLOis=; b=AEB4e7tMDkp31nGwUkxJdp4sNQPfnryeG3ewB9Z3GBlmzFjEEZg1uYBc8jLwButxfx wKdmp1CiePyElpZ+r/ezyfUaVUfVgB4Fs+5/0gFrtr2wg0cRYkxZ2XrB4YTopgV/iWyd 6NxZhEuDTKe2mTOUJNUc1vUpHXfCPJRw2/DdrZ09c1JpcxIsU+0TIwVyrIzKwkHXF4Ji IB4Yumpbjd80LsiLvUZqpG3GWEUjFFlEN/PRdmXzUzjHtOa+epAJ5ga5U94Ogx0z/THw ST0T7EJoie9rKtTfDaecdK2fLB9TE3VL0yMQ8pH0qUap9/I0B/mIWm4YAlYOLaOWYLlJ s+4w== X-Forwarded-Encrypted: i=1; AL+hErFvcm4Puj+gpFeV5JjMkZMSs8tbQWTHdvTZ9v9xmxle6LSiBCWBk8+lbN+ROIEjiFF371t/jP0=@vger.kernel.org X-Gm-Message-State: APuU4Z8cSxOQRbK59DYHRazOju3iwGqaxshejWpLEGiofdnO6k+S/RkQ MgDnKCJUZw8IN25PfK7hmJ7MeEkTs/An5k9IVu02CFY9rBhc8Ymm0nHgmkQNjrdcsQ8= X-Gm-Gg: AZFdTZdiGouEMRaPIqazU7Dsd4KoLdT92hpXOtmxzu5S/pxbmByTAr3/voCyeMkZYc7 xo6wfHhoJf/ruusPJT5JlW0JgWMRYICwQub7k1yS2cI32DO+1Bl272lScE70XO0C9+pAVQE5k1p 9uZ/hnB8Ry3PK7DMeqMu4tv8QLceTaMoZK6Xb4T0p1xDwOijoEQRNqGRhiG/vJkR0djAIkbypL5 Th1uaqvPvEoJpP20WBUPWRhzJY8eEC448XvHO69U//Ws5xH/4gve9Y5NQOk23G2OZgA5VDZApNq zka/euKj0bY+BsFK/p2u2Md3jjCIsmhLGnQhMfZSQnA70jTh02B+vheKEg18ssqaPtUt1vrQoJY ywXDwbDNiier4tgVkshCW6ISzcJHIM+gPWe118RAifL94bGI/qTtF44q480eS80ekMrBg7sr8j8 opxwUOpsrUlIkJ2NYKjLeDaP+XpVnEfWsWTto3vpC58wEF/ziSQ02EL81sGuTD2bllEJDdriwyL e7ZACtuzs4LMn5Tko59GCw+Um87pOVCDwqX4EBmb6dayxN8aS+2xwpY/7lSqlHruO18aDBkATNM eDqsMHnGenHcG9PUXb/XoUgK8efKN956CkO/RP0vLSzVUf6Ku57u/0JcH5BBtsUOXatXs3vF554 TnBKb9jtoRg1EoSseYLmf4oVb02iVf7prtcwbQA== X-Received: by 2002:a17:90b:4fc6:b0:3ac:7e3a:1033 with SMTP id 98e67ed59e1d1-3b3d07d9ff7mr5928287a91.59.1795085602395; Thu, 19 Nov 2026 02:53:22 -0800 (PST) X-Received: from yhlee-960QFG.Davolink ([2406:5900:1044:110c:e78e:f7f0:2120:34e7]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b405d639fdsm2246604a91.10.2026.11.19.02.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 02:53:21 -0800 (PST) X-Cc: tonylu@linux.alibaba.com, guwen@linux.alibaba.com, guangguan.wang@linux.alibaba.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <20260820023347.9D5461F00A3D@smtp.kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Received-Bytes: 12489