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=1796278530; b=hor6fce0nuqa4MX4HutBq5bW/DASs2LzOuWEvdxDB+wLanqlJFRQI41cf8YTMFrgetm1 5yr2DkN7UHRpGzLma2v9V2NYM+hi3HSg01UVqYviBrqmDseQJg3lP9xzCUeWjFzJDWT+K p17NdR9nAQbxpVTLsLtKuaTug8OZtdPhs7RNOwpRBWufi/QGFZimAyz37Y93TL2CmfWEC B3HGDF6iJP4yNI/Syoc9+bxw+NZlyKaI7LvkKY/ku4kGU8S2nDRMOlW/VZTbVocvyBLfl zv/0YMo+CJJFtSW1SQPZPC9XUp/9OgWwzlyZHPWmj5yPlhc7oI5FawpSF9sZcXZeoNw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796278530; 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=O0hUgAeprhhvWGW3xsC58Dj2HsZl+mJQ3xq4avWSaN8=; b=LAh3w29nKE6JwmARwWVYI0+Hj8Fi3Ztzwkh++Yc3Tl1i850/CCaeDT6ClQoXwNr8TnWF 2b53HgzenxbNThsM7Fe83ECBc+fBnH7Gl6LgWE1oR1XAa4djR7MeY3uJcs5pAsWpYpr6G gW97OMEDYktFGGRz0KObYYy8uVGpvcV/gRjnadu23+cbrC5qrDW2SL5GBgNpzfI4kTgBQ rhubD0YwepGNGQATZa/ZLea8GvQUW9q4XyS/GkGvm6vHXeyCBsMxACIVs+QG9ONzILuC1 3HprPwZdCeatsz26giUpufJTo2Ijfs3Ioi181r7K+5LeQ9+9/7BspzSdg60T24CpS0w== 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=RLkL0N7Y; 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 AB86F606A322 for ; Thu, 3 Dec 2026 06:15:30 +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=RLkL0N7Y Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C6A61F000C1; Thu, 3 Dec 2026 06:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796278530; bh=O0hUgAeprhhvWGW3xsC58Dj2HsZl+mJQ3xq4avWSaN8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=RLkL0N7YE0lAd7yJg1J290s/7KKj2jw4z7Q8mXZ0dGf68beuFJC+v7WMYLIxmFI7o TzZ2giVm06j4dpjhF6GqUj+S7GMzZ21zWiH/C2cf4WLoOEOslKU2eVNhdcJjv6mJpA xDxM7MAwWzSfzoZKHQisRJ2TpJvtBauE7XpD9o108qhjC3lZ148KLXPLTtc/7RWBDD /ce788Qb1q9ZY11R6thLasV2Jr855IcfB59pf5vJU63V3hjXWmr0mlSgtvAfFdX2v8 o+votLnpsUwi8QhDJjyYQQ/c7t4oS9xmM9KzI4tCHy7yvSWkhGXcNDQeXOQR3do2aT yB3FlpLf52VfQ== Subject: Re: [PATCH can-next v4 08/23] can: isotp: use the N_As timeout for the local echo 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:29 +0000 Message-ID: <179627852959.3142.15390680073027573555@kernel.org> In-Reply-To: <20261201-getsockopt-memcg-isotp-v4-8-97261be8e38e@hartkopp.net> References: <20261201-getsockopt-memcg-isotp-v4-8-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's reason for halving the local echo timeout does not hold up numerically. -- can: isotp: use the N_As timeout for the local echo This commit cuts the local echo timeout in net/can/isotp.c from 2 s to 1 s, matching the ISO 15765-2 N_As value. It also merges ISOTP_FC_TIMEOUT and ISOTP_ECHO_TIMEOUT into a single ISOTP_TIMEOUT. ECOMM is now documented as the error reported for a local echo timeout. > So far the local echo > timeout was 2 s to cover the frame transmission time (N_As) that was > not added to the timeouts, while the flow control timeout (N_Bs) and > the consecutive frame timeout (N_Cr) use 1 s. > > As the frame transmission time is now added to all timeouts that are > started with the transmission of a CAN frame, use the timeout of 1 s for > the local echo as well and replace ISOTP_FC_TIMEOUT and > ISOTP_ECHO_TIMEOUT with ISOTP_TIMEOUT. [Severity: Low] Is this rationale accurate? Every echotimer start already added so->frame_txtime before this patch. In isotp_rcv_echo(), for example, the patch only changes the seconds term: - ktime_set(ISOTP_ECHO_TIMEOUT, so->frame_txtime), + ktime_set(ISOTP_TIMEOUT, so->frame_txtime), isotp_rcv_fc(), isotp_txfr_timer_handler() and isotp_sendmsg() follow the same pattern. The default frame_txtime is CAN_ISOTP_DEFAULT_FRAME_TXTIME (50000 ns). With default settings, the echo deadline goes from 2 s + 50 us to 1 s + 50 us. Adding frame_txtime gives back only 50 us of the second that was removed. The real reason for the change appears to be the 1000 ms N_As limit from ISO 15765-2, which the message already cites. Could the message give that as the reason, instead of tying the change to the frame_txtime addition? > A CAN frame that can not be sent, e.g. due to a missing acknowledge on > the bus, is now reported with ECOMM after 1 s instead of 2 s. Should this also say that some frames which do reach the bus will now fail? This applies when the local echo arrives between roughly 1 s and 2 s after sending, for example on a congested bus, with a qdisc backlog from other sockets, or with slow USB adapters. In that case isotp_echo_timer_handler()->isotp_tx_timeout() reports ECOMM and sets tx.state to ISOTP_IDLE. The same transfer completed successfully before this patch. The iso15765-2.rst update doesn't give the timeout value or mention this case either. -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201-getsockopt-memcg-isotp-v4-0-97261be8e38e%40hartkopp.net