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=1796070306; b=zGpLloqakP9bsJrAebh+S/ScgU9C3+WdQ0tTQyXUKR8DmKO9JFHPweQzMW2YqxVFPaag dPf5fbqhxM9SY4FeCWvQE+sP5ugZ+uX8aa0ksfYaGnrfnWp3xqT3fpN+9p6lmmcxseJpH U0k/rKiSqmOUwCUkqf3oQG4ylBkYbs4E3HwxzCwzz4tS3sxXPTyO2wZcTdZQtFbitqH1q Vot8tSc4YD+ex3Gq2r8TTevhNxdRjT/rd4AqwIolQXAPv8mjymFHnX20qKhcb+1HPXnHP wzAoe+zTxyM2IqWbrZxujHzO2x8YT6uo0yBncpsFMA4nVDvEB5AO90RwjPOF5AAvN7Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796070306; 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=DhV58ZHacaWOHR1bMi73kguf9QK1ZGNKYQp5Ol+jOs8=; b=Bpd6m3umPvmYOhcNGNSD/4QxdNwWJnGa+Jw/OQfkjL7uPH2FCWbg93ACYyKyU5D0AGT/ uNGwp3W9+Rel/QnaobvqHPHLfsWa0oIf2pXwMrkm5MBEVPKtuEoWoVKSssaYiVdV2NNNE cXKqUyT6l0DlpfeuFH/oM3z1nCX+6CIfKldPqUhF2Q8DF5RytRHGQmWbzSa5TLfBQBjs0 Y5Dq3PTxj7Wz9JccU8+so8aT2Aad01PiVvtZw5mO1SIzGxKUd1x0Z8V/WcfxgXgMxrQX4 XZHX5VCFudyVJbczKDausriYiuOxbWvpI+lyI2Uk+fnhcAXsGOScaqyjfRtHoYRDNYw== 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=N5NwWcDS; 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 6FFAA606A31A for ; Mon, 30 Nov 2026 20:25:06 +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=N5NwWcDS Received: by smtp.kernel.org (Postfix) with ESMTPSA id 163601F00897; Mon, 30 Nov 2026 20:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796070306; bh=DhV58ZHacaWOHR1bMi73kguf9QK1ZGNKYQp5Ol+jOs8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=N5NwWcDSBDZGXdgD/NiFBOcIpMuRkTmDpkawX2BP5eaUGCEqoTqB0aPX+GTuo8314 ocdOj+PNmQ63MYQ4SGGl8eK+5mQplFmxv3hp+s1sYUn5BGMQ6fmHsj4eRJWsjBx1sG fJhop125zQ9zuO4CHZfdvz0+CXlnwY5MEK1Oqis2lQFcpCcEu+U/aGS2fmV9hzqpIS zxfxoLE8QzZMXngSU3/Qst53/N6Nau1BqMJxtmGE4vcD34wwwMJvGNNFyUgH+3q1OK Ir3ambVJDZ2QSEB+fbBS+qCJ0wun4W3xpSP7SmoKJ83EI1IikJPozmzUPADoI8Hdde fHoWftSr+hMGg== Subject: Re: [PATCH can-next v2 07/22] can: isotp: add the frame transmission time to the protocol timeouts 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:05 +0000 Message-ID: <179607030563.3142.8598183944899731858@kernel.org> In-Reply-To: <20261128-getsockopt-memcg-isotp-v2-7-034ba95e17a4@hartkopp.net> References: <20261128-getsockopt-memcg-isotp-v2-7-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] The text this patch adds to Documentation/networking/iso15765-2.rst (lines 211-218) says… -- can: isotp: add the frame transmission time to the protocol timeouts This patch adds so->frame_txtime to the rx timeout started in isotp_send_fc() and to the timer started in isotp_sendmsg(). That timer is the first FC timeout or, for SF and FC-less FF, the echo timeout. It also rejects frame_txtime values above 1 s and documents the new limit and behaviour. Closes: https://lore.kernel.org/linux-can/eb5e9618-3dbf-42cb-a635-752ff9fbcb99@hartkopp.net/ > diff --git a/Documentation/networking/iso15765-2.rst b/Documentation/networking/iso15765-2.rst > index badcd16c070bb..1962209f2db5c 100644 > --- a/Documentation/networking/iso15765-2.rst > +++ b/Documentation/networking/iso15765-2.rst > @@ -208,10 +208,14 @@ where the ``can_isotp_options`` structure has the following contents: [ ... ] > +* ``frame_txtime``: frame transmission time in nanoseconds (defined as > + N_As/N_Ar inside the ISO standard); if ``0``, the default (or the last set > + value) is used. To set the transmission time to ``0``, the > + ``CAN_ISOTP_FRAME_TXTIME_ZERO`` macro (equal to 0xFFFFFFFF) shall be used. > + The frame transmission time is limited to the N_As/N_Ar timeout of 1 s > + (1000000000 ns) defined in the ISO standard. It is added to the gap between > + the consecutive frames and to the protocol timeouts that are started after > + the transmission of a CAN frame. [Severity: Low] Does this sentence match what the code does after this patch? frame_txtime is only added at two timer starts. One is the rxtimer start in isotp_send_fc(). The other is the single tx_hrt start in isotp_sendmsg(), which arms either so->txtimer (first FC) or so->echotimer (SF, or FF with CAN_ISOTP_CF_BROADCAST). The same so->echotimer is also used for the CF local echo timeout. Its other start sites still use no frame_txtime: net/can/isotp.c:isotp_rcv_fc() { ... hrtimer_start(&so->echotimer, ktime_set(ISOTP_ECHO_TIMEOUT, 0), HRTIMER_MODE_REL_SOFT); isotp_send_cframe(so); ... } net/can/isotp.c:isotp_rcv_echo() { ... if (!so->tx_gap) { /* enable echo timeout handling */ hrtimer_start(&so->echotimer, ktime_set(ISOTP_ECHO_TIMEOUT, 0), HRTIMER_MODE_REL_SOFT); isotp_send_cframe(so); ... } net/can/isotp.c:isotp_txfr_timer_handler() { ... hrtimer_start(&so->echotimer, ktime_set(ISOTP_ECHO_TIMEOUT, 0), HRTIMER_MODE_REL_SOFT); ... } The FC wait timeout that isotp_rcv_echo() starts after a block completes is not extended either: WRITE_ONCE(so->tx.state, ISOTP_WAIT_FC); hrtimer_start(&so->txtimer, ktime_set(ISOTP_FC_TIMEOUT, 0), HRTIMER_MODE_REL_SOFT); After this patch the SF/FF echo timeout is 2 s + frame_txtime, but the CF echo timeout stays at 2 s. Both wait for the local echo of a frame that was just handed to can_send(). With the new 1 s cap and the 2 s ISOTP_ECHO_TIMEOUT, this doesn't look like it causes a functional failure. The commit message mentions the SF echo extension as a side effect, but it doesn't explain why the CF echo timers differ. Should the documentation be limited to the FC related timeouts? The other option would be to add so->frame_txtime to the CF echotimer starts as well, so the documented rule holds. As far as I can tell, these call sites are still unchanged at the end of the series. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261128-getsockopt-memcg-isotp-v2-0-034ba95e17a4%40hartkopp.net