linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Mike Purvis <mpurvis@clearpathrobotics.com>,
	Michal Sojka <sojkam1@fel.cvut.cz>
Cc: tom_usenet@optusnet.com.au,
	"Armin Burchardt" <armin@uni-bremen.de>,
	linux-can@vger.kernel.org, "Pavel Píša" <pisa@cmp.felk.cvut.cz>
Subject: Re: Standard CAN over IP
Date: Mon, 09 Feb 2015 19:32:02 +0100	[thread overview]
Message-ID: <54D8FD22.8030903@hartkopp.net> (raw)
In-Reply-To: <CACsJT9P5w0J7a2htZLqd1EboET3FMYJ=_Hr86TChPBF-Y2rSvQ@mail.gmail.com>

Hi all,

yes it was an academic approach to check how to route CAN frames via UDP 
inside the kernel (and do some performance measurements too).

The main problem was the missing 'standard' configuration possibility of UDP 
connections to establish the UDP/IP link without an user space application.

So I wonder if it would make sense to add some (small) CAN specific code to be 
able to use the new 'Foo over UDP' support which has been added to the 3.18 
Kernel recently:

http://lwn.net/Articles/614348/

Tom Herbert created some pretty generic configuration interface to establish 
UDP sockets inside the kernel.

Regards,
Oliver

On 09.02.2015 17:00, Mike Purvis wrote:
> It's a bummer that N_SLCAN has no checksumming or validation built in
> at all. Definitely suggests that SLCAN devices are meant more for
> diagnostic/observational use than actual control. (And perhaps another
> argument for wrapping the SLCAN tty stream in TCP or UDP).
>
> Michal— this work looks interesting. However, I'm probably not
> interested in taking on an abandonware project. Was this ever
> maintained/deployed anywhere, or was it purely an academic exercise?
>
> Mike
>
> On 6 February 2015 at 03:33, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
>> Hi Mike,
>>
>> On Thu, Feb 05 2015, Mike Purvis wrote:
>>> Hi Tom,
>>>
>>> Yes, thanks— in the short term, I'm going to prototype using an off
>>> the shelf USB-based device. In the fullness of time, I'll probably
>>> either implement the protocol myself as part of a larger MCU also
>>> doing some other stuff, or bring a BSD-licensed implementation of the
>>> protocol, if such a thing exists.
>>>
>>> Looks like you might be able to get CAN over TCP/UDP in two steps, by
>>> using socat to link a pty to the network socket, and then running
>>> slcand (or the guts of it) against the pty. Does anyone know what the
>>> efficiency story is with socat? Does it copy back and forth between
>>> between userspace and kernelspace, or is it able to operate fully in
>>> kernel-land the way slcand does?
>>
>> Socat definitely copies everything over the user space.
>>
>> In the past, we developed a kernel-based CAN-to-Ethernet gateway. See
>> http://rtime.felk.cvut.cz/can/can-eth-gw.pdf (the documentation is not
>> perfect). The kernel part is at
>> https://rtime.felk.cvut.cz/gitweb/can-eth-gw-linux.git/blob/HEAD:/net/can/canethgw.c.
>> It would probably need minor updates for current kernels. The user space
>> part, which just configures the kernel to do its job, is at
>> https://rtime.felk.cvut.cz/gitweb/can-utils.git/blob/refs/heads/cegw:/cegw.c.
>>
>> The kernel part was measured to be about 10% faster (on x86), but this
>> number depends on the architecture. System calls on modern x86 have less
>> overhead than, for example, on PPC32.
>>
>> Cheers,
>> -Michal
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2015-02-09 18:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 20:27 Standard CAN over IP Mike Purvis
2015-02-04 20:44 ` Armin Burchardt
2015-02-04 21:38   ` Mike Purvis
2015-02-04 22:42     ` Gerhard Bertelsmann
2015-02-05  0:50     ` Tom Evans
2015-02-05 13:15       ` Mike Purvis
2015-02-06  8:33         ` Michal Sojka
2015-02-09 16:00           ` Mike Purvis
2015-02-09 18:32             ` Oliver Hartkopp [this message]
2015-02-04 23:43 ` Tom Evans
2015-02-18 17:57 ` Maximilian Güntner
     [not found]   ` <CACsJT9M4QbYkDvQkGfhFuwA6haNyV5zesUFtLzB5VEbxP=obBA@mail.gmail.com>
2015-02-19  3:21     ` Mike Purvis
2015-02-19 14:58     ` Maximilian Güntner
2015-02-20 11:43   ` Oliver Hartkopp
2015-02-23 12:25     ` Maximilian Güntner
2015-02-23 13:08       ` Oliver Hartkopp
2015-02-23 14:27         ` Maximilian Güntner
2015-02-23 16:22           ` Oliver Hartkopp
2015-03-20 16:54   ` Maximilian Güntner
2015-03-23 10:28     ` Pankajkumar Misra (RBEI/EEA2)
2015-03-23 13:15       ` Maximilian Güntner
2015-03-23 16:57         ` Pankajkumar Misra (RBEI/EEA2)
2015-03-23 13:23       ` GARNERO, PIERRE (P.)

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=54D8FD22.8030903@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=armin@uni-bremen.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mpurvis@clearpathrobotics.com \
    --cc=pisa@cmp.felk.cvut.cz \
    --cc=sojkam1@fel.cvut.cz \
    --cc=tom_usenet@optusnet.com.au \
    /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).