linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
	Mirza Krak <mirza.krak@hostmobility.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [RFC] K-Line protocol via SocketCAN
Date: Sat, 11 Jun 2016 21:42:18 +0200	[thread overview]
Message-ID: <575C699A.8080000@denx.de> (raw)
In-Reply-To: <5759CDC9.2010204@hartkopp.net>

On 06/09/2016 10:12 PM, Oliver Hartkopp wrote:
> On 06/09/2016 09:21 PM, Marek Vasut wrote:
>> On 06/09/2016 08:29 PM, Oliver Hartkopp wrote:
> 
>>>> I am more interested in the RTNL configuration interface, since the
>>>> kline has way too many parameters and the RTNL scales well in that
>>>> aspect.
>>>
>>> If like rtnl so much why don't you create a K-Line netdevice driver for
>>> it and use the PF_PACKET socket to exchange data with the netdevice?
>>
>> Because last time I did that with the arinc, I was told to integrate
>> that into the socketcan instead.
>>
>>>> When using the socket interface, I can also add various flags to the
>>>> packet and control the properties of the data that are to be
>>>> transmitted
>>>> via the KLine interface. That's real convenient.
>>>
>>> But that has nothing to do with PF_CAN.
>>
>> So I should add another orthogonal infrastructure ? That's what I did
>> with the arinc and I was told the exact opposite, so I am really
>> confused here .
> 
> ARINC 825 *is* CAN. When people tell you to use the existing
> infrastructure that was a good hint, but K-Line is definitely not CAN.

Well, I was talking about arinc 429 .

> Your patch set shows that you are adding things to the CAN
> infrastructure that have nothing to do with CAN.
> 
> E.g. the K-Line timing you add in patch 4/5 has nothing to do with CAN
> specific configurations.
> 
> Additionally I don't know whether the struct kline_frame is the optimal
> solution because it sticks to struct can_frame and does not reflect the
> (optional) K-Line address scheme.
> 
> So you could either use the sl_kline.c with PF_PACKET and create a
> separate rtnl configuration for it OR you could create a character
> device which handles K-Line frames and has some ioctls to configure the
> specialized timings.

Is adding a specialized chardev really such a great idea ?

> As K-Line never was multi-user capable by design the chardev approach is
> the most 'natural' concept IMHO.

I could technically just implement this as a ldisc with some additional
ioctls, but is that really such a good idea ?

> Regards,
> Oliver
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-06-11 19:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 23:15 [RFC] K-Line protocol via SocketCAN Marek Vasut
2016-05-20  6:04 ` Mirza Krak
2016-05-20  6:28   ` Oliver Hartkopp
2016-05-20 11:59     ` Marek Vasut
2016-05-22 20:27       ` Patrick Menschel
2016-05-22 21:11         ` Marek Vasut
2016-06-01  2:26       ` Marek Vasut
2016-06-05 12:07         ` Oliver Hartkopp
2016-06-09 15:00           ` Marek Vasut
2016-06-09 18:29             ` Oliver Hartkopp
2016-06-09 19:21               ` Marek Vasut
2016-06-09 20:12                 ` Oliver Hartkopp
2016-06-11 19:42                   ` Marek Vasut [this message]
2016-06-12 19:28                     ` Oliver Hartkopp
2016-06-13 22:07                       ` Marek Vasut
2016-06-14  6:10                         ` Oliver Hartkopp
2016-06-15  3:42                           ` Marek Vasut
2016-06-15  6:57                             ` Oliver Hartkopp
2016-06-15 11:05                               ` Marek Vasut

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=575C699A.8080000@denx.de \
    --to=marex@denx.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mirza.krak@hostmobility.com \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.com \
    /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).