From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796070305; b=AJDR3QFj7+kDUH/x7oED88QQzd5VzoeMpSgNUN+pgADDE7Xpsu/RGTxmECyBGOD8wThI PxiP/M2t2YAsub+k6mkgyc1JuhBG/JIvnx+RAAYkkQGHHClCIwuhy317nkpBc67mWQKmW MF67RCwtdeBP7rEhx/C7G9PMqn566gRIi4LMBuksRPZ4CX7XCLtoUuORKn+RqzNMVjzqT MeOKFSbh9QIuCaY5elogthNsTUs0yOwf0tkfejrQMD39g4FWIYrh5uKnrEhCwPvmQ3gLy 1BsP0BlXJxi5qwgzUoLmj4wuiENl7sYDhAV8ngIJje+juxV92ZZN06c+91VZWtSUMOg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796070305; 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=XukiXccpdVGvAqQg41ZzTEHjjm2z0zCu6pV2Tp7oH2I=; b=0hASbMCpwlxN72EnbPa0LvPksaGuV+U1D3dN45Jb7FKlOos2szJVYrQNmpPI2px7uh/G SNzzf5UHbcz5Y/OUgfZbytK3w06CSJnba4H+fbeVJoop4Xnj0iuQXjYSDONmWmz53WCJ+ xJUvicPLCc0r45i4g5sZ/0ksHYgLu1GBjvvFH0Q+sHcc54EvhpLLGCH77ojTshnyzBCyV 2QmnT70IST1SqnqxjUezVtazzQh2zvRGkh+qEtkbeO6Gf3Mma8KgDXnOFTNRZupeOifR/ OaxBOtglt7dmzdir/JQrHNlR52Hz0NQUFOfEXcW6RcZEQomh+smEIcJMg/wWbIcpeVw== 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=KE6amCCL; arc=none smtp.remote-ip=100.103.45.18 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 0EF73606A31A for ; Mon, 30 Nov 2026 20:25:04 +0000 (UTC) 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=KE6amCCL Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79C731F00897; Mon, 30 Nov 2026 20:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796070304; bh=XukiXccpdVGvAqQg41ZzTEHjjm2z0zCu6pV2Tp7oH2I=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=KE6amCCL7OFfM/cp1pK3lAqxDCmG7KAsrtu7TyQD0/GAj+yLzWF5xgbCHjwWbl14D jB/G/w+FG/HOvfUE1a3iTe2crz0UCds4PjjLWE1Pv254qe6exKEF/a+uSYIrV+O7S9 5nPQjawwu8Ela4UlL/EaR31AsfvSpp+t/kDeLK6jWrxdhiYUJDrMYjo2Xd/opqWIy4 LoFMVdo46/jSUgFO3sV94HdwGugNsyTrV8D1CVt1BfoQs07Is1J+cqlQAliOmkq6sO 5wlGw36oyohlFNnu5U2DbDMVi5fbhO8cNNr/lmdPaM4Fa/EKfwtfdcGRLpVtP6PQNS rNBXA+VwtpVvQ== Subject: Re: [PATCH can-next v2 04/22] can: isotp: do not send FC.OVFLW in listen mode From: netdev-bot+sashiko@kernel.org To: socketcan@hartkopp.net Cc: linux-can@vger.kernel.org, mkl@pengutronix.de, kuba@kernel.org Date: Mon, 30 Nov 2026 20:25:04 +0000 Message-ID: <179607030408.3142.17546637288293835782@kernel.org> In-Reply-To: <20261128-getsockopt-memcg-isotp-v2-4-034ba95e17a4@hartkopp.net> References: <20261128-getsockopt-memcg-isotp-v2-4-034ba95e17a4@hartkopp.net> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-can@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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] This patch moves the CAN_ISOTP_LISTEN_MODE check into isotp_send_fc() (net/can/isotp.c:297-299), so the function now returns… -- can: isotp: do not send FC.OVFLW in listen mode This patch moves the CAN_ISOTP_LISTEN_MODE check out of isotp_rcv_ff() and isotp_rcv_cf() and into isotp_send_fc(). With this change a listen mode socket sends no flow control frames at all. That includes the FC.OVFLW frame sent when the FF_DL exceeds the receive buffer. > diff --git a/net/can/isotp.c b/net/can/isotp.c > index 3b83507a8c21b..650d93e84c8eb 100644 > --- a/net/can/isotp.c > +++ b/net/can/isotp.c > @@ -294,6 +294,10 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus) > struct isotp_sock *so = isotp_sk(sk); > int can_send_ret; > > + /* no creation of flow control frames in listen mode */ > + if (so->opt.flags & CAN_ISOTP_LISTEN_MODE) > + return 0; > + > nskb = alloc_skb(so->ll.mtu, gfp_any()); > if (!nskb) > return 1; > @@ -643,10 +647,6 @@ static int isotp_rcv_ff(struct sock *sk, struct canfd_frame *cf, int ae) > hrtimer_start(&so->rxtimer, ktime_set(ISOTP_FC_TIMEOUT, 0), > HRTIMER_MODE_REL_SOFT); > > - /* no creation of flow control frames */ > - if (so->opt.flags & CAN_ISOTP_LISTEN_MODE) > - return 0; > - > /* send our first FC frame */ > isotp_send_fc(sk, ae, ISOTP_FC_CTS); > return 0; [Severity: Low] This isn't a bug, but is the comment just above this hrtimer_start() in isotp_rcv_ff() still accurate? /* start rx timeout, isotp_send_fc() restarts it */ hrtimer_start(&so->rxtimer, ktime_set(ISOTP_FC_TIMEOUT, 0), HRTIMER_MODE_REL_SOFT); In listen mode, the new early return in isotp_send_fc() skips three steps at the end of the function: so->rx.bs = 0; so->lastrxcf_tstamp = ktime_set(0, 0); hrtimer_start(&so->rxtimer, ...); Before this patch, the listen mode exception was written out at each call site. Now isotp_send_fc() is called in listen mode but does not restart rxtimer, so the comment is only true some of the time. isotp_rcv_cf() has the same comment before its isotp_send_fc() call. Runtime behavior doesn't change at this commit, because both hrtimer_start() calls use ktime_set(ISOTP_FC_TIMEOUT, 0). Later in the series (bf53ca579974), isotp_send_fc() restarts the timer with ktime_set(ISOTP_FC_TIMEOUT, so->frame_txtime) while the callers still use 0, and the comments stay the same. Someone reading the comment would then expect a listen mode socket to get the frame_txtime extended timeout. Could the comment be reworded, for example "isotp_send_fc() restarts it when an FC is actually sent (not in listen mode)"? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261128-getsockopt-memcg-isotp-v2-0-034ba95e17a4%40hartkopp.net