From: David Jander <david@protonic.nl>
To: Patrick Menschel <menschel.p@posteo.de>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Austin Schuh <austin@peloton-tech.com>,
Oliver Hartkopp <socketcan@hartkopp.net>,
linux-can <linux-can@vger.kernel.org>
Subject: Re: j1939
Date: Wed, 5 Oct 2016 08:48:45 +0200 [thread overview]
Message-ID: <20161005084845.697b8f20@erd980> (raw)
In-Reply-To: <7661b770-574f-6337-d9a9-ff2103ebb8a6@posteo.de>
On Tue, 4 Oct 2016 19:54:30 +0200
Patrick Menschel <menschel.p@posteo.de> wrote:
> >> Recently, someone on this list was confronted with an engine ECU that
> >> dropped TP that had the last packet not 8 bytes long.
> >> And I believe I've encountered an issue a long time ago where this
> >> happened on all PGNs.
> >> So I introduced this option, having 3 possibilities:
> >> * no padding
> >> * padding for TP
> >> * padding for all PGN.
> > How to switch between padding for TP only and padding for all PGN?
> >
> > Marc
> >
>
> I'm working with J1939 regularly and programmed J1939 in Python3 a while
> ago.
>
> From my experience, message construction is responsibility of the user
> program.
I agree.
> There are numerous SPNs to be implemented in a message while
> unimplemented bits are to be padded with ones.
> It may be possible to pad all messages with 0xFF but that doesn't solve
> the non implemented bits in front of the padding.
I think the kernel should never modify packets from user-space in such a way.
I think we should limit this option to chose between:
0: (default) Strictly standards compliant (i.e. pad TP messages) and
1: Not pad TP messages (may break standard).
> I think it's best practice to fulfill the requirements by creating a
> j1939 message with 8 Bytes of 0xFF and then replace the bits for a
> specific SPN.
That may be true for many standard PGN's, but not for all, and certainly not
for proprietary messages. Again, IMHO, the kernel should not mess with
user-space messages.
> This would be in user space when calling the J1939 message constructor.
Precisely.
> BTW many j1939 descriptor files types such as the PCAN ".sym" files,
> define SPNs as a bit offset and a length (additionally with type, factor
> and offset as compu_method), so no need to invent the wheel again.
Don't know exactly what you mean, but this sounds user-space specific to me.
> Regards,
> Patrick
>
Best regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2016-10-05 6:48 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 16:54 j1939 Marc Kleine-Budde
2016-09-19 18:27 ` j1939 Oliver Hartkopp
2016-09-19 18:52 ` j1939 Marc Kleine-Budde
2016-09-19 19:44 ` j1939 Oliver Hartkopp
2016-09-19 21:37 ` j1939 Austin Schuh
2016-09-20 7:15 ` j1939 David Jander
2016-10-04 7:37 ` j1939 Kurt Van Dijck
2016-10-04 12:52 ` j1939 David Jander
2016-10-04 13:57 ` j1939 Kurt Van Dijck
2016-10-04 14:47 ` j1939 David Jander
2016-10-04 16:12 ` j1939 Austin Schuh
2016-10-04 17:31 ` j1939 Kurt Van Dijck
2016-10-04 17:51 ` j1939 Marc Kleine-Budde
2016-10-04 18:40 ` j1939 Kurt Van Dijck
2016-10-04 18:46 ` j1939 Marc Kleine-Budde
2016-10-05 18:02 ` j1939 Kurt Van Dijck
2016-10-06 7:26 ` j1939 Marc Kleine-Budde
2016-10-06 7:41 ` j1939 Kurt Van Dijck
2016-10-04 17:32 ` j1939 Marc Kleine-Budde
2016-10-04 17:54 ` j1939 Patrick Menschel
2016-10-04 18:38 ` j1939 Kurt Van Dijck
2016-10-04 18:43 ` j1939 Marc Kleine-Budde
2016-10-05 5:08 ` j1939 Kurt Van Dijck
2016-10-05 6:48 ` David Jander [this message]
2016-10-05 6:50 ` j1939 David Jander
2016-09-20 9:09 ` j1939 Marc Kleine-Budde
2016-10-04 7:41 ` j1939 Kurt Van Dijck
2016-10-04 7:28 ` j1939 Kurt Van Dijck
2016-10-04 15:05 ` j1939 Marc Kleine-Budde
2016-09-20 7:22 ` j1939 David Jander
2016-09-20 8:01 ` j1939 Marc Kleine-Budde
2016-10-06 8:44 ` j1939 Kurt Van Dijck
2016-10-06 8:59 ` j1939 Marc Kleine-Budde
2016-10-06 9:24 ` j1939 Kurt Van Dijck
2016-10-06 9:37 ` j1939 Marc Kleine-Budde
2016-10-06 10:26 ` j1939 Kurt Van Dijck
2016-10-06 10:28 ` j1939 Marc Kleine-Budde
2016-10-06 11:13 ` j1939 Kurt Van Dijck
2016-10-06 11:32 ` j1939 Kurt Van Dijck
2016-10-06 12:13 ` j1939 Marc Kleine-Budde
2016-10-06 12:26 ` j1939 Kurt Van Dijck
2016-10-06 13:08 ` j1939 Marc Kleine-Budde
2016-10-08 19:48 ` j1939 Kurt Van Dijck
2016-10-09 8:40 ` j1939 Marc Kleine-Budde
-- strict thread matches above, loose matches on Subject: below --
2013-11-14 0:26 J1939 David H. Lynch Jr.
2013-11-14 20:31 ` J1939 Kurt Van Dijck
[not found] ` <1384532982.6591.14.camel@hp-dhlii>
2013-11-20 9:36 ` J1939 Kurt Van Dijck
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=20161005084845.697b8f20@erd980 \
--to=david@protonic.nl \
--cc=austin@peloton-tech.com \
--cc=linux-can@vger.kernel.org \
--cc=menschel.p@posteo.de \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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