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=1796278528; b=tuLaXLORtq2PK1P+/gx3ReLazeobojjvPLy+lj2hyKEGFLU7B9ipbvS5dZGS1zlu7bp4 HteH24JE5GjFwqz9n8ac/mqgF7N8yw8IFz8vMeUUYyLdPnFF9zjhi9tp9aZye+frFMdX5 ZkXFGllNSaU3jBkCYLiK+6FL1St489wafGROF1HfgzdWkJmfzvaRnovEGEoB1TdijV0Lr bPC4rZrMsNpmbJq/upDu1sKpGGz1mqZcSfBtmXqGgeE7wJDsMQMLqWD+RFtZAY/PEp4GC awdyYXxcdklhPQMvZDLNPEkGZFupLA5ofJ2Ldk6cjZNwEqwP0xFlq70usvj4yv7IHlA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796278528; 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=4kaR0P4w6VPv/9zQ7evJjCNG84CKpYgJ8KrmAGHxENw=; b=W2imm5ILXQGgDus5nP6zBv4jy1j03vg54vGOLlQzi55ciXgnz4QWOOWA5Ca7tmz/K3gn 22N76wCMmzOYab3Y2X8qRbFcabGvBhoeSSwWwP5kltCKz7zXzwjtAozd4uHXeTXLnwr60 3ZTB69tBeJR7svEU+TVNgyTlhJAuwcmP7/RFRV5ZSYF07bjLWmwgla9337gGqw0ZykYN1 ahGZXlwJOqrsrx1Ge8O2u5ggvHzydjFE5JNRKzcNd86gd2dJa4fbaUi7mMDLVRD9rheoD Ry/+wGw1uaWUmXtPYFisODPgwA2Xi8K5YNR3Soke+9gFntWnaoNBU2ULOt+bdkFjZsw== 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=j4Sv6bR8; 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 D5A3C606A32F for ; Thu, 3 Dec 2026 06:15:28 +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=j4Sv6bR8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0428F1F000C1; Thu, 3 Dec 2026 06:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796278528; bh=4kaR0P4w6VPv/9zQ7evJjCNG84CKpYgJ8KrmAGHxENw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=j4Sv6bR8gp7OlZdMhEza69YSreQyFcQGmJ427r8OqlQ/iJAPdLo1moOWHVZm7K2yW ErmbtzBrRTlMlkAwqZ/aECFLEMAWsBi4P3X1hFBIVBN3l/3S5G8l/iiYPhkPVlK3iQ HsFZj5vuz1dM4qriig/4VJRVUWCTxAaoF14UWhswBm801WWWk1nISgf2jak6OBeEp4 L21jZxDxT3gHmbmL+U6XJy+CrjhwjYxshiguErvWTZWEZqjlZrSjk3u2FF/cEdawlH dJc90uxc/KYvnkbOsnC+WusYAa9+LGk8Cn1lG6vH1XCJDuYHmAq3XCFqIWHONFBod3 uTZm9XuTvRr8w== Subject: Re: [PATCH can-next v4 06/23] can: isotp: add the frame transmission time to the CF broadcast gap From: netdev-bot+sashiko@kernel.org To: socketcan@hartkopp.net Cc: linux-can@vger.kernel.org, mkl@pengutronix.de, sashiko-bot@kernel.org, zihanx@nebusec.ai, o.rempel@pengutronix.de, yewentian395@gmail.com, kuba@kernel.org Date: Thu, 03 Dec 2026 06:15:27 +0000 Message-ID: <179627852755.3142.6819152437799386881@kernel.org> In-Reply-To: <20261201-getsockopt-memcg-isotp-v4-6-97261be8e38e@hartkopp.net> References: <20261201-getsockopt-memcg-isotp-v4-6-97261be8e38e@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] The commit message does not say whether the code change is a bug fix. -- can: isotp: add the frame transmission time to the CF broadcast gap This patch adds frame_txtime to the consecutive frame gap in CAN_ISOTP_CF_BROADCAST mode when CAN_ISOTP_FORCE_TXSTMIN is set, so the gap matches the flow control mode. It also documents the CF broadcast gap and fixes the stmin unit (microseconds -> nanoseconds) in iso15765-2.rst. > In CAN_ISOTP_CF_BROADCAST mode there is no FC and the gap is set in > isotp_sendmsg(). With the CAN_ISOTP_FORCE_TXSTMIN flag only the value of > the CAN_ISOTP_TX_STMIN socket option is used and the frame transmission > time is missing. [ ... ] > Additionally fix the unit of the values of the CAN_ISOTP_TX_STMIN and > CAN_ISOTP_RX_STMIN socket options in iso15765-2.rst. Both values are > handled in nanoseconds by the implementation, as documented in isotp.h. > As the uAPI header isotp.h has always documented the stmin values in > nanoseconds, there is no Fixes tag for the documentation. > diff --git a/net/can/isotp.c b/net/can/isotp.c > index 8817f0ef7fd9e..7b88b3ace919e 100644 > --- a/net/can/isotp.c > +++ b/net/can/isotp.c > @@ -1292,11 +1292,11 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) > isotp_create_fframe(cf, so, ae); > > if (isotp_bc_flags(so) == CAN_ISOTP_CF_BROADCAST) { > - /* set timer for FC-less operation (STmin = 0) */ > + /* set timer for FC-less operation (N_As + N_Cs) */ > + so->tx_gap = ktime_set(0, so->frame_txtime); > if (so->opt.flags & CAN_ISOTP_FORCE_TXSTMIN) > - so->tx_gap = ktime_set(0, so->force_tx_stmin); > - else > - so->tx_gap = ktime_set(0, so->frame_txtime); > + so->tx_gap = ktime_add_ns(so->tx_gap, > + so->force_tx_stmin); [Severity: Low] Should the code change in isotp_sendmsg() carry a Fixes tag, or a statement that it is not a bug fix? The commit message explains why the documentation part has no Fixes tag. It says nothing either way about the code part, even though it describes the old behaviour as a defect ("the frame transmission time is missing"). The replaced lines come from: 9f39d36530e5 ("can: isotp: add support for transmission without flow control") That commit set so->tx_gap to force_tx_stmin alone when CAN_ISOTP_FORCE_TXSTMIN is set. isotp_rcv_fc() has always computed the gap as frame_txtime plus STmin (or force_tx_stmin): net/can/isotp.c:isotp_rcv_fc() { ... so->tx_gap = ktime_add_ns(so->tx_gap, so->frame_txtime); if (so->opt.flags & CAN_ISOTP_FORCE_TXSTMIN) so->tx_gap = ktime_add_ns(so->tx_gap, so->force_tx_stmin); ... } With this patch, every CF gap gets longer by frame_txtime (50 us by default) for an existing uAPI configuration. isotp_rcv_echo() uses so->tx_gap to arm txfrtimer. Other patches in this series say this explicitly. For example, "can: isotp: check the CAN FD tx_flags in CAN_ISOTP_LL_OPTS" and "can: isotp: reject reserved STmin values in CAN_ISOTP_RECV_FC" both state "This is an intentional tightening of the uAPI and no bug fix". Would it make sense to either add "Fixes: 9f39d36530e5" here, or say that this is an intentional behaviour change and not a bug fix? That would tell stable backporters what is intended. -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201-getsockopt-memcg-isotp-v4-0-97261be8e38e%40hartkopp.net