Article View: linux.kernel.netdev
Article #26850Re: [PATCH net v3 7/7] net/smc: skip the urgent byte when it is the next unread byte
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 09:49
Date: Fri, 04 Dec 2026 09:49
96 lines
11907 bytes
11907 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 stable backport prerequisites are not stated.
- [Low] The patch changes what urg_rx_skip_pend means but leaves its
definition comment alone.
--
net/smc: skip the urgent byte when it is the next unread byte
With this patch, smc_rx_recv_urg() sets urg_rx_skip_pend whenever the
reader has not yet passed the urgent byte. Before, it was set only when
regular data was in front of that byte. The patch also calls
smc_rx_update_consumer() for a zero-length recv(MSG_OOB), so the urgent
byte is skipped and the sender does not stall.
> Fixes: de8474eb9d50 ("net/smc: urgent data support")
> Suggested-by: Sidraya Jayagond <sidraya@linux.ibm.com>
> Cc: stable@vger.kernel.org
[Severity: Low]
Should this stable tag name the patches this one depends on?
The hunk in smc_rx_recv_urg() only applies on top of two earlier patches
in this series:
"net/smc: update the urgent state under the socket spinlock" adds the
valid and byte locals, the bh_lock_sock() block and the if (len > 0)
layout that this patch rewrites.
"net/smc: order the urgent mark across the cursor wrap rollover" adds
the smc_curs_sdiff(...) > 1 test that this patch changes to > 0.
At the baseline, smc_curs_sdiff() does not exist anywhere in net/smc/.
The cursor wrap patch already marks its own dependencies with
"Cc: stable@vger.kernel.org # depends on 2/7 and 4/7". Could this patch
carry a similar note? Without one, anyone who backports it alone based on
the Fixes: tag will hit a context conflict and won't know which patches
to take first.
> diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
> index 2680b91e882b9..579ee008900ce 100644
> --- a/net/smc/smc_rx.c
> +++ b/net/smc/smc_rx.c
> @@ -342,12 +342,14 @@ static int smc_rx_recv_urg(struct smc_sock *smc, struct msghdr *msg, int len,
> valid = conn->urg_state == SMC_URG_VALID;
> if (valid) {
> byte = conn->urg_rx_byte;
> - if (len > 0) {
> - smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn);
> - if (smc_curs_sdiff(conn->rmb_desc->len, &cons,
> - &conn->urg_curs) > 1)
> - conn->urg_rx_skip_pend = true;
> - }
> + /* The reader has not passed the urgent byte: have
> + * smc_rx_update_consumer() skip it once it is the next
> + * unread byte.
> + */
> + smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn);
> + if (smc_curs_sdiff(conn->rmb_desc->len, &cons,
> + &conn->urg_curs) > 0)
> + conn->urg_rx_skip_pend = true;
[Severity: Low]
This isn't a bug, but should the comment on urg_rx_skip_pend in struct
smc_connection in net/smc/smc.h be updated as well? It still reads:
bool urg_rx_skip_pend;
/* indicate urgent oob data
* read, but previous regular
* data still pending
*/
With the old > 1 test, the flag meant at least one regular byte was in
front of the urgent byte, which matched that comment.
With the new > 0 test, which no longer depends on len, the flag is also
set when sdiff == 1. In that case the urgent byte is itself the next
unread byte and no regular data is pending, for example after
recv(MSG_OOB|MSG_PEEK) at the mark.
The SIOCATMARK handling in af_smc.c checks urg_rx_skip_pend together with
sdiff == 1, and smc_rx_update_consumer() is gated on the flag. From the
smc.h text, someone could conclude that this combination cannot occur,
but after this patch it happens routinely.
[ ... ]
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203-b4-disp-ba1ad55e-v3-0-6834ff90c5d0%40proton.me
Technical Details
Message-ID:
<179637777294.3146.2610356583355852527@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-377228-linux-kernel-netdev=dewy.ruReferences:
<20261203-b4-disp-ba1ad55e-v3-7-6834ff90c5d0@proton.me>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-377228-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v3 7/7] net/smc: skip the urgent byte when it is the next unread byte Date: Fri, 04 Dec 2026 09:49:32 +0000 Organization: Usenet Network Message-ID: <179637777294.3146.2610356583355852527@kernel.org> References: <20261203-b4-disp-ba1ad55e-v3-7-6834ff90c5d0@proton.me> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2729944"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:WQKId8Ih/kvMSVHO/obbd6eX5eg= sha256:uAXdr2Lw7zANPTl+OFpprvUynUtLTan7GU3Ld24Qoac= sha1:3b9q2Jn2SXXmPOaneYZ0oAKvCM8= sha256:WJQV4JWHsKM+f2/lmdbrfoGg35VtitPZYWYPIMwO2Dg= 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 51322117B8A; Fri, 4 Dec 2026 12:49:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.739 X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.24, 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 QTppnnKS7AN1; Fri, 4 Dec 2026 12:49:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377228-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id E6BE6117B85; Fri, 4 Dec 2026 12:49:41 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id C027C28086; Fri, 4 Dec 2026 09:49:36 +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=1796377775; b=RImps2WyEm8PXJj2cqlOlayngZkHORLXucrHa7UonEPlusGrMbAz9KrAAlPxno0zrruE t1S271YZP2LOLmLeU8B3Y2+BKrLsU8a//dUUqqOMLQCUFoCTcUJzTADzic7rEzGPajCMk Nt9YyLDmpvNblGshnsVdnaESxQJ0O6ZKqrUVi1G6UfD/O66BeuCjKHGJzZsVnKLcO05dL Ibzp0HF81kmylfhYcOgBRkw4/X4LCkJFbi5TnU99a9k/T3IlD7qvAHYlSUVJistf1q5Mn 1JLIiMs2mhEV+ApoHCxWi1r8g6KAfA8kPe9b1K6dLi+aRFZdvYGYZiQyjUFyY8plN0w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796377775; 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=XYYvzfX7DQ+bCepMwTMy2CBFNA/+XCvpTPybZgRdZMo=; b=stNuIv4R6Kg+Xv9qgwRB6Akz31P6KSTEqjp/yYkql823MCef1+2Y8oCec/jBhFZ+c6eV m4resGpYn5ghjuj6f4Mpt5bOSeXRLovRbt4Sug7wDEV7vk0CVso5nm8TSb5tfRywlu2ed vJPtSf0ZwwnHNbh7gqGAL2X/97AV5T+kKsZYjyHmLA0QEe8joocUS9uXrtVHro4RtlaBj YWhgBP5G+i0dNBrrZxYnyiUOASUX1ZNCmSFmR40wl6y8xUm/RG5Ge/CnhzIdQ5mhDDYkG I2HGfmvsx/JWRrS5ch/tYMz40WOKIEdiJYTRarPqTc7SOgsEo/5HcGGyl8mPYeJKQSw== 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=fLllmhFl; 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 D1DC9606A68C; Fri, 4 Dec 2026 09:49:35 +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=fLllmhFl 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=1796377775; b=KYnFnRr4VwAO37kG3AwUWqkcBwdVccUuwqvdjkuOIhncRyHWGvRf3SHIVrEMMLdzbVTt 7Ab8Y0ZvDJNGge5zfulF2bpk4GIxBL2zp09moaiv4O+rYWhdBzRe7TjWMSA+lDuu3GS6u kRIOWJdekxk9rcqAiCNQpsN1JivnkLxfvHeIe1kBoWtSL4LyRqz52AhkmROMRXpy4ZwqY qku3/KTKfteW0dNPb55n2SmVc3jA6tdbn7S//hokde5Uekv/nrn83i+c1uU/hIjb11Ar6 4tm8wNULmC9O7PV7MFgvDo6mhnZpPS7eeWZci5emXXP0BdcJNA1XZCce+OIKo5M5/nw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796377775; 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=XYYvzfX7DQ+bCepMwTMy2CBFNA/+XCvpTPybZgRdZMo=; b=Ak9MEZ2GECWzRJJf0wVV56gAXU06VfPYsO2OknMlR49p1oqPqhqKIQwSwH/BVR3Vfj45 K5owKwDiWPPJmyeoLSzZ8kRNYVUhohmaG3tsvL1PsuDSP3RiUrxTUxLgfrWETrq2AoLTO 35hIlE6y+DuSQK0D6ehB5sje/M+U6IG1g1DL/vuKBcZ6Df1aGXwuoHcb7iHTXvhkP27n+ EoEr+vczWsMjxQCIvbSLGySiQRJCcGtNsK1C46AR2a7oyCKWwoJMFUXLz3qVnPZqiw1aQ PxfZOzXUiuRvHQqU05NqqppAU+W3Ecb1/XZBSec639Zc584m1QyEoVBk+akOSvCHPuA== 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=fLllmhFl; 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 F2096606A33A; Fri, 4 Dec 2026 09:49:34 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65AEE1F000CE; Fri, 4 Dec 2026 09:49:33 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796377774; bh=XYYvzfX7DQ+bCepMwTMy2CBFNA/+XCvpTPybZgRdZMo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=fLllmhFlSFhOzKPDrymvDk0ULekQlNHNzIuC5GYE7rvn46YlzuZGnoW5lK/AoeyJP oZEPg44jzpyFjwwuMIu6kUbCNjjIjILXtgtPv4Ilvntn4khgkJnLY51evetixEwhRk yOUU1cycRaY1w7vLZnZiSPPnjdY9QQpwHZUmyQrsA7UoO0oCkxhILN4A9mm2TAdmtB PgLeG5cqd4v2SgpT/fjXgF/8y2rD7Esw8NqXv2W15wmdIbeRXK+IFntsbs4U+l/mx3 KFTd/eAUtP6M4Wf4iMXfm0xkC+9nT5hzlc4VR0FbY7cr1T0l+myLEt2rnGFXkkzJ9h rpDgthFN8uOxQ== X-Cc: edumazet@kernel.org, pabeni@redhat.com, davem@davemloft.net, kuba@kernel.org, mjambigi@linux.ibm.com, sidraya@linux.ibm.com, alibuda@linux.alibaba.com, willemb@google.com, dust.li@linux.alibaba.com, guwen@linux.alibaba.com, guangguan.wang@linux.alibaba.com, tonylu@linux.alibaba.com, ubraun@linux.ibm.com, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, hidayath@linux.ibm.com, horms@kernel.org, wenjia@linux.ibm.com, linux-kernel@vger.kernel.org, raspl@linux.ibm.com, netdev@vger.kernel.org X-In-Reply-To: <20261203-b4-disp-ba1ad55e-v3-7-6834ff90c5d0@proton.me> 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