All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Sebastian Haas <dev@sebastianhaas.info>
Cc: "Heinz-Jürgen Oertel" <hj.oertel@t-online.de>, linux-can@vger.kernel.org
Subject: Re: adding can4linux to drivers/char
Date: Mon, 30 Sep 2013 10:21:55 +0200	[thread overview]
Message-ID: <f5d9cc7300d20a95ccca9ae080c280ee@grandegger.com> (raw)
In-Reply-To: <CADGMhsWUYN8gYqaRFH802jHmDgC2kamdLzDCgOvhhB-MYG-0hQ@mail.gmail.com>

On Mon, 30 Sep 2013 09:40:37 +0200, Sebastian Haas
<dev@sebastianhaas.info> wrote:
> 2013/9/29 Wolfgang Grandegger <wg@grandegger.com>:
>> On 09/29/2013 06:28 PM, Heinz-Jürgen Oertel wrote:
>>>
>>> Hello
>>>
>>> Am Samstag, 21. September 2013, 21:55:45 schrieb Wolfgang Grandegger:
>>>> I think you need *strong* arguments to get it accepted.
>>>
>>> I have some good arguments for this kind of driver
>>> - it is much more simple in design than others,
>>>   simplicity is one of the Linux design goals
>>> - It has a simple user API
>>> - It does not need any other infrastructure than the kernel API
>>> - It is mature
>>
>> Well, the question is in what respect it's (much) better than the
>> existing Linux-CAN. I can imagine some performance benefits on very low
>> end systems, if at all.
> Again think about memory (RAM/ROM) as well. We are talking here about
small
> ARM7TDMI stuff and other creepy and limited systems.

Do you have figures? I remember that the a chardev based solution is not
really
*much* better.

>>> I agree, it would be nice to share the low level CAN controller
related
>>> experiences of the developers. That is may be something we can share
if
>>> we
>>> could agree of a set of CAN controller header files with shared
register
>>> #defines. And a set of very basic functions like initialize and
>>> activate CAN,
>>> set acceptance filters, transmit and receive, read out error register
or
>>> whatever.
>>
>> Sounds ugly!
> Sharing definitions and common functions sounds ugly to you? What does
> the candev
> and sja1000dev in Socket CAN does?

OK, pure share is fine but I had ugly #ifdef's in mind.
 
>>> But to stay simple, I don't like the idea to have another additional
>>> layer
>>> around SocketCAN as layer below the can4linux API.
>>>
>>> Linux offers real diversity on the desktop, why not with drivers?
Linux
>>> also
>>> has different sound devices and architectures.  Why not offering two
>>> different
>>> CAN driver concepts to the application programmer,
>>> let she decide what to use.
>>
>>
>> It's also about maintenance. It's real work to keep a driver in the
>> kernel up-to-date, to review and accept new drivers, etc., not only for
>> the initial submitter.
> Right, and I think a chardev drivers has far less dependencies to
maintain
> then
> the Socket CAN driver. No netdev changes to maintain, iputils stuff or
> changes
> in the candev ;-)
> 
> A reason more trying to share code with a chardev solution!
> 
>> There are missing bits and pieces in Linux-CAN, e.g. hardware filter
>> support, improved bus-off handling or even bitrate detection. That's
>> also not a strong argument for can4linux. Just contribute them to
>> Linux-CAN.
> Well, some things can't be done cause of the underlying networking
> subsystem
> (namely the queuing) which is perfectly fine for real networking stuff
> (>= IP) but
> not that well for CAN IMHO.

I do not say that can4linux is bad but image we have another CAN interface
in the kernel supporting a *different* set of devices... and we will end
up with such a solution sooner than later, for sure. This means that
people
will finally not have the real choice but are forced to use the interface
supporting their device. It breaks portability! I believe that's a *bad*
solution for the community.

Wolfgang.


      reply	other threads:[~2013-09-30  8:21 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
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 [this message]

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=f5d9cc7300d20a95ccca9ae080c280ee@grandegger.com \
    --to=wg@grandegger.com \
    --cc=dev@sebastianhaas.info \
    --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.