Article View: linux.kernel.netdev
Article #27005Re: [PATCH net-next v2 2/4] net/smc: check the ADD_LINK_CONT send result in the server rkey exchange
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 15:41
Date: Fri, 04 Dec 2026 15:41
82 lines
11018 bytes
11018 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message for "net/smc: check the ADD_LINK_CONT send
result in the server rkey exchange" overstates the bug.
--
net/smc: check the ADD_LINK_CONT send result in the server rkey exchange
This patch makes smc_llc_srv_rkey_exchange() check the return value of
smc_llc_add_link_cont() and leave the loop when the send fails, which
matches smc_llc_cli_rkey_exchange(). Before the patch, the server side
ignored the send result and called smc_llc_wait() anyway.
> smc_llc_srv_rkey_exchange() discards it and goes on to wait for a reply
> to a message that was never transmitted, so the round can only end in
> the wait timing out. Make the server side behave like the client side.
[Severity: Low]
Is "can only end in the wait timing out" accurate for most send failures?
smc_llc_wait() is called with a non-NULL link. wait_event_timeout()
checks its wake condition before it sleeps:
net/smc/smc_llc.c:smc_llc_wait() {
wait_event_timeout(lgr->llc_msg_waiter,
(flow->qentry ||
(lnk && !smc_link_usable(lnk)) ||
list_empty(&lgr->list)),
time_out);
...
}
If smc_wr_tx_link_hold() fails, smc_llc_add_link_cont() returns -ENOLINK.
In that case the link is not sendable (INACTIVE or UNUSED), so
smc_link_usable() is already false and the wait returns immediately.
There are two other failure paths: ib_post_send() failing in
smc_wr_tx_send(), and the free slot wait in smc_wr_tx_get_free_slot()
timing out with -EPIPE. Both call smcr_link_down_cond_sched()
synchronously:
net/smc/smc_core.c:smcr_link_down_cond_sched() {
if (smc_link_downing(&lnk->state)) {
...
}
smc_link_downing() does cmpxchg(state, SMC_LNK_ACTIVE, SMC_LNK_INACTIVE).
The link is therefore already INACTIVE when smc_llc_wait() is entered,
so the wait again returns without sleeping.
A full SMC_LLC_WAIT_TIME wait seems to happen only in narrower cases:
- the link is still ACTIVE but its QP is not in RTS (-ENOLINK or
-EPIPE)
- the lgr is terminating but still on the list (-EBUSY)
The only caller, smc_llc_srv_add_link(), handles every non-zero rc the
same way:
rc = smc_llc_srv_rkey_exchange(link, link_new);
if (rc)
goto out_err;
So the patch seems to have two visible effects. The errno changes from
-ETIMEDOUT to the send error, and the narrow cases above fail sooner.
No exchange that used to succeed now fails, and none that used to fail
now succeeds. The code change looks correct and matches
smc_llc_cli_rkey_exchange().
Since the patch carries a Fixes: tag, could the commit message say that
the effect is limited to the errno and the shorter failure time in those
cases?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203153514.1440337-1-ermenson.sec%40gmail.com
Technical Details
Message-ID:
<179639891276.3146.3933202468528297356@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377450-linux-kernel-netdev=dewy.ruReferences:
<20261203153514.1440337-3-ermenson.sec@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377450-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v2 2/4] net/smc: check the ADD_LINK_CONT send result in the server rkey exchange Date: Fri, 04 Dec 2026 15:41:52 +0000 Organization: Usenet Network Message-ID: <179639891276.3146.3933202468528297356@kernel.org> References: <20261203153514.1440337-3-ermenson.sec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2796877"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:IbZVQcpc4SqJNpf9SP//+pQrTlk= sha256:7b6WsLyscbzYtUvuYk8IaGHpfECg9EJhoKeNXZpAcCw= sha1:2UI3BCUGXe1Egu760jl0CSozdB0= sha256:zc/PCP4BzRvvjs+5IUtqGThKCU+2c6aXa5XzWzX9Vgs= 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 B73D8117C53; Fri, 4 Dec 2026 18:42:18 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.541 X-Spam-Status: No, score=-3.541 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 XfpGLhyhXvhZ; Fri, 4 Dec 2026 18:42:10 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377450-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3F254117C3D; Fri, 4 Dec 2026 18:42:01 +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 3FC398457B; Fri, 4 Dec 2026 15:41:55 +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=1796398915; b=dRuni1zoxvFL2c1tvh/SoHCEwIVeU8UbxzQCpKpFBy2K+/IqHHcJibH9I1jcpw9OpJxJ EMHOd6fLiCjNY/cMCCRllOU59A4DXfnSFBdva7wD31ak3H1HR0/gxckV10c5nJEnIESco YMc3dow4yOuIe4+5jab5REe/pJuvDqi8hohimzzOk4VkjGtgvvo9XxqKURJa0tsG58wP8 PB0Dc6W17C4GLDbR1xLTmGpE5fye8ib6G1E5xwXpLwVEJMXmFpyhtIbyMwm/JDgKCPoZ4 mUzLviuzEv3K/Fn82OJNfNRY0wJMIh2CXxTxuHprKgyhyfWRim2R3YyyXDTImEwElSQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796398915; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=4O2nTA4WZ4kYXmLt5KF3Bn56pFxI8XrFB2t5EvxcwFw=; b=IV/AYw+C4Q2CEUhZX3+oZ3np3gjZYMzFVTx9k/x1/27pwsq6ui97I40+fx9j1rJ9MnmL 99Ncr36Huonu0/T+krOU9cUiklW4CvlipvXDv6us+JXFc39IMz08ntA8aOvYHyiuurqxI UpQKUD9c/7LQwVvwTcT63zlpLDHuWspwxsR78/v7D1dJ42LeL5nzIuuvYQ8uVzceX7XLb U/rlDD/hQwlqQ73JIZntuDVA0EPHZ/I1BGqi5t8Q+XSDJSEUEyc5u37MzkO6Imj6zc28V pX37FRIFqm2oavX1P7qXKXLQq1/2/JfaZ0qJETZubMTOZ7ohJJsw2l6j5Gbb74GpbIA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UWW3XHma; 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 179C0606A337; Fri, 4 Dec 2026 15:41:55 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UWW3XHma X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796398914; b=NtLDReToVOW4vizrZayV+3+ETDk6ox9+PqlZHE2dSIB2+BOU8x5g0PpgBY+cuY17hdl8 lAeiWGdx3OcJZTE+hgVMshrkV8h3qZ4V16HGyJYwpghxPOH3pKZZUXN0GYh62KdSkyHQR r9ZfJzWI73YXq82a2YFQEPw40vjYyr0g5HumLV8bUkq21orJqpLQPjuREUBK/VeeaBpgZ igta4tKtxLbWWIiw5usMMH8Eytfcd07FguJdrLWpJcysABbDZWw4DRI0zf0DgXJWQB+r0 WoJxbozpjAZOViJ9moqHnWBptyJjjuJhIlzd5DKa9Y5u6iRBYd7+d9+350zK6UMg0vw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796398914; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=4O2nTA4WZ4kYXmLt5KF3Bn56pFxI8XrFB2t5EvxcwFw=; b=udbF5v3IVNnh6uRF87dLpeUUJu7PT59M6VJREj8+1eHC4wgMGKPwyI/6vs9uEPqqrnv7 lVky5daVyTNAql3Q3szemh/txhUaHZ7y3sqM8I9w3FxiSZRb1eSlY1My48RB5XTA8iyMR 8l1iyDoudm2zldzr9olkb06+ZJQftYFbm/5SUIAFvM1pGfbsdPw1bdKUDAhs9CwLaAH5w Mh3B6+cxoTpOOE5nn+35xP0aGc1vXHlNCq7xfMSMUcG4+5iO8gNoAPsLofEnoBXrEgHxs +3dBRgVRvnUtoV9PYcV6rU1O7Z8l7l3D9/aLnHlHZVP8T2uwC+ijAEq5n4ZecowJwtg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UWW3XHma; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39CBD606A33C; Fri, 4 Dec 2026 15:41:54 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 341B71F000C2; Fri, 4 Dec 2026 15:41:53 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796398914; bh=4O2nTA4WZ4kYXmLt5KF3Bn56pFxI8XrFB2t5EvxcwFw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=UWW3XHmaukhowzHPP19f9yls75oGu+Vkx7MrGYeDs2++hfkUbkb0hEoUp9vbbS5Q+ Jir2GTOWcVVcnF3R4CLTxtJ9hdUK+7zdyCWGySNKcAH9Beq9TZjuIgdrmE8RcsXSdl C7qHHRsGX2T/ncv4Klq/Of47ndwb1mm5mVLsiyeS+YtZTj5ZNdYFjxWcocAAxIqbN5 M6eYOZzFZfjf6gAXko3+df3BhCFAN0AOcjLjQ0wREe+yxnuOZFZYHRA7NJJCWobU3P d6O0hVjsQF77kOLOzUkFaqtFEDmqqGY4zt95lPgdWqzKdlQLr3tUYUHmAeYdjTr3zr z+t4K8TYscGKA== X-Cc: alibuda@linux.alibaba.com, dust.li@linux.alibaba.com, sidraya@linux.ibm.com, mjambigi@linux.ibm.com, 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 X-In-Reply-To: <20261203153514.1440337-3-ermenson.sec@gmail.com> X-sashiko-severity: Low 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