From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Patrick Menschel <menschel.p@posteo.de>,
linux-can <linux-can@vger.kernel.org>,
Alex Layton <alex@layton.in>,
Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Subject: Re: can-j1939 API
Date: Mon, 19 Oct 2015 08:07:31 +0200 [thread overview]
Message-ID: <562488A3.2010204@hartkopp.net> (raw)
In-Reply-To: <5624667E.3080809@posteo.de>
Hi all,
On 19.10.2015 05:41, Patrick Menschel wrote:
> Am 18.10.2015 um 04:42 schrieb Kurt Van Dijck:
>>>
>>> 1. concerning J1939, I think it would be best to implement it is a
>>> "view" on can0 without changing can0 itself.
>>
>> What exactly do you mean with 'view'?
>>
> Basically leave the can0 functionality as it is and add another
> interface such as J1939_0 or whatever. That way other applications may
> still use normal can0. But maybe I just misunderstood your concept,
> sorry if that's the case.
>
I also have problems to understand the concept for a while now.
>>> As it's already been mentioned, j1939 may share the physical layer with
>>> other protocols, i.e. CanOpen on diesel powered railway equipment or
>>> proprietary protocols of some OEMs for construction machinery.
>>> If there is tester or application equipment installed, CCP is usually
>>> also present.
>>
>> Thanks for the example.
>> IMHO, CanOpen uses only 11bit CANids, so theres no collision in the CAN
>> id space. Does anyone ever encountered CAN protrocols that have
>> collisions in the CANid space with can-j1939?
>>
>>>
>>> 2. concerning address claiming and address collision handling via the
>>> NAME property, I think it should be handled in user space, not within
>>> the module as you may have multiple source addresses on the same device.
>>> For example Engine ECU SA 0x00 and Emission Controller SA 0x3D usually
>>> are one and the same physical device.
>>
>> I think I partly share your conclusion,
>> I do not understand how multiple addresses on an ECU are an argument
>> for handling address claiming in userspace.
>>
> If the device running socketcan+j1939 can only have one SA, it would not
> allow such multi-role implementations.
I would definitely demand multi-role implementations as this is one of the
main SocketCAN goals to have the entire networking setup running on one host
or on different hosts without changing the application.
See:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/networking/can.txt?h=linux-4.2.y#n185
If I understood the concepts correctly:
Kurts implementation:
- grabs the entire interface (the entire Linux box?!)
- binds node addresses to the interface (Linux box?!)
- socket addressing matches the function
Alexs implementation:
- socket addressing matches the node address
Both implement address claiming (AC) in Kernel space - which would only fit
the SocketCAN idea of multi-role implementations, when the AC is per-socket in
Alexs concept.
We should try to move as much functionality as possible out of the kernel.
When address claiming makes sense there it should stay there.
IMO Alexs concept is not only much smaller in code size and impact to the
existing af_can infrastructure - it also implements the multi-role concept in
a slim way the experienced CAN programmer would expect.
Or did I miss anything vital?
Best regards,
Oliver
next prev parent reply other threads:[~2015-10-19 6:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <linux-can/can-utils/pull/7@github.com>
2015-09-28 6:53 ` [can-utils] J1939 v6 (#7) Marc Kleine-Budde
2015-09-29 12:15 ` Kurt Van Dijck
2015-09-30 15:26 ` Aaron Clarke
2015-09-30 23:38 ` Kurt Van Dijck
[not found] ` <linux-can/can-utils/pull/7/c144149208@github.com>
2015-09-29 18:46 ` Marc Kleine-Budde
2015-09-29 19:49 ` can-j1939 API Kurt Van Dijck
2015-09-29 20:10 ` Austin Schuh
2015-10-15 22:04 ` Alex Layton
2015-10-16 19:36 ` Patrick Menschel
2015-10-18 2:42 ` Kurt Van Dijck
2015-10-19 3:41 ` Patrick Menschel
2015-10-19 6:07 ` Oliver Hartkopp [this message]
2015-10-19 9:52 ` Kurt Van Dijck
2015-10-19 16:53 ` Alex Layton
2015-10-19 20:57 ` Kurt Van Dijck
2015-10-19 21:31 ` Kurt Van Dijck
2015-10-22 16:39 ` Alex Layton
2015-10-18 2:32 ` Kurt Van Dijck
2015-10-19 16:53 ` Alex Layton
2015-10-19 20:44 ` Kurt Van Dijck
2015-10-22 16:39 ` Alex Layton
2015-10-23 11:14 ` Kurt Van Dijck
2015-10-29 19:33 ` Oliver Hartkopp
2015-10-29 23:38 ` Kurt Van Dijck
2015-11-02 12:14 ` Oliver Hartkopp
2015-11-02 12:29 ` Kurt Van Dijck
2015-11-02 13:18 ` Oliver Hartkopp
2015-11-11 19:48 ` Kurt Van Dijck
2015-11-10 21:58 ` Yang
2015-11-11 18:49 ` Kurt Van Dijck
2015-11-17 6:01 ` Yang Wang
2015-11-17 8:43 ` 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=562488A3.2010204@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=alex@layton.in \
--cc=dev.kurt@vandijck-laurijssen.be \
--cc=linux-can@vger.kernel.org \
--cc=menschel.p@posteo.de \
/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;
as well as URLs for NNTP newsgroup(s).