All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Heinz-Jürgen Oertel" <hj.oertel@t-online.de>
Cc: linux-can@vger.kernel.org
Subject: Re: adding can4linux to drivers/char
Date: Sat, 21 Sep 2013 11:17:51 +0200	[thread overview]
Message-ID: <523D643F.6040703@hartkopp.net> (raw)
In-Reply-To: <1881932.U1kQQJkqCz@heinz.site>

[-- Attachment #1: Type: text/plain, Size: 2727 bytes --]

On 21.09.2013 01:03, Heinz-Jürgen Oertel wrote:
> Hello Linux CAN community,
> 
> long before SocketCAN, which now is part of the Linux kernel drivers, can4linux was available as the CAN device driver for Linux.
> 
> I now like to add it to the kernel source tree as well. What to you think about it. And how should I start and proceed?
> I would like to start with the Xilinx XCANPS as can be found on the Zynq processor. Maybe also with one PCI board, the CPC-PCI (EMS Wünsche).
> 
> What is the best way? My current development for the PC is based on OpenSuse with kernel 3.7.10. for Xilinx it is kernel 3.10. Can I send a patch against 3.7 and to whom can I send it?

Hello Heinz,

merging the two different approaches makes sense in that way that the
different users of the can4linux character device API should be able to take
part of the Linux mainline improvements.

The question is how to make it a win-win for both sides without doing double work:

1. SocketCAN & can4linux users should be able to use a common CAN driver pool
2. The netdev and the chardev should be able to run simultaneously
3. The chardev API preferably should support all chardev flavours

Indeed i did some evaluations about the migration from the chardev API of
can4linux to SocketCAN in my thesis on page 156ff

(unfortunately in german)
A.8 Migration existierender CAN Anwendungen

You might get the thesis from here:
http://edoc.bibliothek.uni-halle.de/servlets/DocumentServlet?id=9738

In chapter 8.2 there's a concept describing the co-existence of a character
device emulator and how to connect it to the existing Linux CAN
infrastructure. A screenshot from that picture is attached to this mail.

The advantages of this approach:

- only one hardware driver pool to maintain (e.g. add Xilinx as netdev driver)
- SocketCAN and can4linux apps can run simultaneously on the same CAN hardware
- SocketCAN protocols CAN_BCM and the CAN gateway CAN_GW are still operational
- a compact and easy maintainable chardev API adapter emulation
- can4linux API users get access to all existing CAN netdev drivers (USB, ...)

A real good thing would be if the chardev emulation adapter would support
different chardev flavours like can4linux, PEAK, LinCAN, ...

Of course there would be something to do for the existing infrastructure too.

E.g. the netlink configuration interface for the bitrate settings has to be
made accessible for the chardev emulator. Probably features of the chardev
concepts have to be integrated into the mainline CAN driver infrastruture.
Thinking about hardware filters: These can be easily emulated by the SocketCAN
filter lists, that are per-socket anyway (see picture).

Any thoughts about this idea?

Regards,
Oliver


[-- Attachment #2: chardev_emu.png --]
[-- Type: image/png, Size: 6846 bytes --]

  reply	other threads:[~2013-09-21  9:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 23:03 adding can4linux to drivers/char Heinz-Jürgen Oertel
2013-09-21  9:17 ` Oliver Hartkopp [this message]
2013-09-21 19:57   ` Wolfgang Grandegger
2013-09-21 13:38 ` Marc Kleine-Budde
2013-09-21 16:37   ` Sebastian Haas
2013-09-21 17:09     ` Marc Kleine-Budde
2013-09-21 18:17       ` Oliver Hartkopp
     [not found]         ` <CADGMhsXaJOpbdCgEAoOguZWX2rS_P0a-H5UDZwUWiHD4Nj=upw@mail.gmail.com>
2013-09-22 10:40           ` Marc Kleine-Budde
2013-09-22 11:01           ` Oliver Hartkopp
2013-09-23 13:46       ` Marc Kleine-Budde
2013-09-21 19:55 ` Wolfgang Grandegger
2013-09-29 16:28   ` Heinz-Jürgen Oertel
2013-09-29 17:44     ` Marc Kleine-Budde
2013-09-29 17:45     ` Sebastian Haas
2013-09-29 18:44       ` Marc Kleine-Budde
2013-09-29 19:23         ` Max S.
2013-09-29 19:17           ` Heinz-Jürgen Oertel
2013-09-29 19:43           ` autobaud detection (was: Re: adding can4linux to drivers/char) Marc Kleine-Budde
2013-09-30  7:30         ` adding can4linux to drivers/char Sebastian Haas
2013-09-30 10:20           ` Kurt Van Dijck
2013-09-29 19:23       ` Heinz-Jürgen Oertel
2013-09-30  9:35         ` Oliver Hartkopp
2013-10-01 20:20           ` AW: " May, Stefan
2013-10-02  7:49             ` Oliver Hartkopp
2013-10-02  8:43             ` Linux CAN CUSE hacks, SocketCAN and RT Was: " Pavel Pisa
2013-10-02  9:47               ` Wolfgang Grandegger
2013-09-29 19:41     ` Wolfgang Grandegger
2013-09-30  7:40       ` Sebastian Haas
2013-09-30  8:21         ` Wolfgang Grandegger

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=523D643F.6040703@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=hj.oertel@t-online.de \
    --cc=linux-can@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.