From: Oleksij Rempel <o.rempel@pengutronix.de>
To: "Hölzl, Alexander" <alexander.hoelzl@gmx.net>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Markus Koeniger <markus.koeniger87@gmail.com>,
robin@protonic.nl, linux-kernel@vger.kernel.org,
kernel@pengutronix.de, linux-can@vger.kernel.org
Subject: Re: [PATCH] can: j1939: fix potential race condition in BAM segmentation
Date: Thu, 1 Oct 2026 13:37:02 +0200 [thread overview]
Message-ID: <ar5F3nxH6pvuE_Up@pengutronix.de> (raw)
In-Reply-To: <9da1ca76-4c89-4109-ba78-c08cfe69ea19@gmx.net>
Hi,
On Thu, Oct 01, 2026 at 01:18:27PM +0200, Hölzl, Alexander wrote:
> Hello,
> Am 01.10.2026 um 12:57 schrieb Marc Kleine-Budde:
> > On 01.10.2026 12:42:21, Markus Koeniger wrote:
> > > I really appreciate your solution to schedule the TX timer for a BAM
> > > transfer after receiving the looped-back frame.
> >
> Glad that I could help.
>
> > > We use external CAN controllers in our system, which introduce some
> > > jitter into the transmit path. As a result, messages were sent from
> > > time to time too quickly and violated the 50 ms minimum interval. Your
> > > patch solves this problem.
> > >
> > > Tested-by: Markus Koeniger markus.koeniger@liebherr.com
> >
> > Thanks for testing, however I'm not sure if we can get this patch
> > upstream if sashiko complains about it.
> >
> I wasn't planning on letting this patch stall. Next week I'll try to address
> sashiko comment's as well as the other patch I still have open.
Nice, thx.
I'm working right now on j1939 selftests for core functionality. Hope
it will be ready this week. If not, next week i'll be in Prag on E-OSS
conference...
> Additionally while I'm at it I just wanted to ask, is it intended behavior
> that the kernel implementation strictly serializes all J1939 sessions. E.g
> when sending a segmented message directed to destination address A it is not
> possible to have a second session open targeting destination address B.
> According to the standard this is allowed and not
> being able to do so can result in very low performance in some use-cases.
> This especially true if one of the sessions is a BAM session transmitting a
> longer message, as there are 50ms pauses between each frame.
Is it not working with a separate socket? If I remember it correctly,
this behavior should be supported if two sockets send to separate
addresses. Withing one socket, frames should be serialized.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-10-01 11:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 9:06 Alexander Hölzl
2026-10-01 10:42 ` Markus Koeniger
2026-10-01 10:57 ` Marc Kleine-Budde
2026-10-01 11:18 ` Hölzl, Alexander
2026-10-01 11:37 ` Oleksij Rempel [this message]
2026-10-01 11:54 ` Hölzl, Alexander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ar5F3nxH6pvuE_Up@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=alexander.hoelzl@gmx.net \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.koeniger87@gmail.com \
--cc=mkl@pengutronix.de \
--cc=robin@protonic.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®