netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: Adding support for ARINC429 into the Linux kernel
Date: Fri, 28 Jun 2013 14:53:44 -0700	[thread overview]
Message-ID: <20130628215344.GA9437@roeck-us.net> (raw)
In-Reply-To: <201306201052.53898.arnd@arndb.de>

On Thu, Jun 20, 2013 at 10:52:53AM +0200, Arnd Bergmann wrote:
> On Thursday 20 June 2013, Guenter Roeck wrote:
> > On Wed, Jun 19, 2013 at 11:45:30PM +0200, Arnd Bergmann wrote:
> > > On Wednesday 19 June 2013, Guenter Roeck wrote:
> > > 
> > > Since this is a standard protocol, a driver that just supports a specific
> > > chip (1a) would be the worst option IMHO.
> > > 
> > It would not be optimal, but straightforward and easy to implement.
> 
> The most important aspect would be the user interface: We should not
> merge a driver that implements a character device (or something else)
> in a way that would not be compatible with a general subsystem. I think
> designing a generic interface is the hard part here, much more so than
> implementing an abstraction layer.
> 
> > > A character device and a network protocol both sound reasonable, but
> > > it really depends on the use cases:
> > > 
> > > * Does Linux act both as the sender and receiver, or do you want to
> > >   support just one of the cases (which?)?
> > > 
> > Both, depending on the use case. Some of those are
> > 
> > 1) ACARS -
> >    http://en.wikipedia.org/wiki/Aircraft_Communications_Addressing_and_Reporting_System
> >    Rx and tx
> > 
> > 2) CIDS - Cabin Intercommunication Data System
> >    Rx and tx
> > 
> > 3) IRS (Inertial Reference System) and FMS (Flight Management System)
> >    Rx only
> 
> Ok, I see.
> 
> > > * Would you expect to always just transfer a single 32-bit word, or
> > >   are there larger chunks of logically contigous data? What are typical
> > >   and maximum sizes for those?
> > > 
> > The raw protocol is chunks of 32 bit (Logical Data Unit, or LDU), which
> > the protocol refers to as 'physical layer'. Broadcast messages such as
> > those from IRS and FMS use this format.
> > 
> > There is also bit-oriented data. The two protocols I am aware of are "Bit-
> > Oriented File Transfer Protocol", and "Bit-Oriented Media Access Control
> > (MAC) Protocol", which is supposed to be IEEE 802 compliant. Packet size
> > is 3 to 255 LDUs for FTP and 3 to 1023 LDUs for the MAC protocol.
> > Both include a SOF and EOF marker, so the actual data size would be 1-253
> > or 1-1021 LDUs. Each LDU carries 20 bit, and partial words are possible
> > in 4-bit increments, which means the data transfer size is 4 to 20,420 bit
> > (2,552.5 bytes) for the MAC protocol, and 4 to 5,060 bit (632.5 bytes)
> > for FTP.
> > 
> > Bit-oriented data is commonly used for ACARS and CIDS, where bi-directional
> > communication is used.
> > 
> > Details are available in Specification ARINC-429P3-19-2009, sections 2.5 and 3.0.
> > You should be able to find it on the web if you are interested.
> 
> Ok, this sounds like it would make a network type interface more
> practical, at least for the 802 specific parts.
> 
> > > * Would you expect the kernel to filter for specific data on the
> > >   receiver side?
> > > 
> > Each LDU has an 8-bit label. Applications listen for specific sets of labels.
> > The chips have a configurable hardware filter; if there are not enough hardware
> > filters, the kernel would have to do the filtering. Either case, the kernel
> > has to select protocol receivers (sockets or open file descriptors) based
> > on bind/registration information. For example, one aplication may register
> > for label 1,3,5, and 7, and another for labels 1, 3, 12, and 14. So there can
> > be overlaps.
> 
> Ok
> 
> > > * Would a user space receiver want to always see all data from one
> > >   sender, or only the latest word?
> > > 
> > The receiver would want to receive all data for the labels it has registered
> > for.
> > 
> > Hope this helps. Note that, at least as first step, I only envision to handle
> > 4-byte units and pass those to/from user-space. Implementing the two link layer
> > protocols would probably make sense, especially with the socket interface,
> > but that would be a second step.
> 
> My vote would be for a new socket family for the low-level protocol,
> with room for extension later to support the advanced features.
> 
> This should be one of the simplest socket implementations possible, if
> you just need to send and receive 32 bit words, and can bind to a
> a set of labels for rx as you described above.
> 
> The only possible concern I see with that interface is slightly higher
> latency than what you would be able to get with a straight read/write
> based character device.
> 
Any further feedback on this ?

Key question: Would a new address family have a chance of being accepted ?

Guenter

  reply	other threads:[~2013-06-28 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 20:29 Adding support for ARINC429 into the Linux kernel Guenter Roeck
2013-06-19 21:45 ` Arnd Bergmann
2013-06-20  4:10   ` Guenter Roeck
2013-06-20  8:52     ` Arnd Bergmann
2013-06-28 21:53       ` Guenter Roeck [this message]
2013-07-01 10:06         ` Pavel Machek

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=20130628215344.GA9437@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 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).