public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Krüger" <daniel.krueger@systec-electronic.com>
To: Robert Schwebel <r.schwebel@pengutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org,
	Michael Olbrich <mol@pengutronix.de>,
	Wolfram Sang <wsa@pengutronix.de>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: The Linux Staging tree, what it is and is not.
Date: Fri, 20 Mar 2009 16:16:15 +0100	[thread overview]
Message-ID: <49C3B33F.1020905@systec-electronic.com> (raw)
In-Reply-To: <20090320111552.GS5367@pengutronix.de>

Robert Schwebel schrieb:
> On Fri, Mar 20, 2009 at 10:55:56AM +0000, Alan Cox wrote:
>> It depends where you split the stack between kernel and user space. There
>> needs to be enough in the kernel to allow reasonably efficient
>> multi-process models but that can be a small part of the stack. The
>> Appletalk stack is a good example. Appletalk has a single address/port
>> system for all higher level protocols and the higher level protocols
>> don't interact much with each other. It's actually very elegant in that
>> way. One result of this is that the AF_APPLETALK kernel stack deals only
>> with low level packet routing and delivery. It doesn't have to care about
>> higher stuff to provide the needed separation and sharing. IP by
>> comparison has all sorts of interactions, multiple port addressing
>> schemes and ICMP interactions which mean the kernel has to hold the
>> entire TCP and UDP layers.
> 
> So what "layers" do we have for CANopen, EtherCAT and PowerLink?
> 
> - the lower api is getting ethernet frames
> - the stack itself is a state machine that pushes things to objdict
> - objdict needs to notify applications on certain changes
> - userspace needs to trigger state machine on certain objcict changes by
>   the application
> 
> We can either put the state machine into the kernel or into userspace;
> if userspace, the kernel API is already there (socket), if kernel we
> would need an objdict API.

My understanding of an object dictionary is that it is only a structured 
view to a set of configuration variables, process variables and 
diagnostic information. It could also be an XML file or a simple C 
struct. In our implementation the object dictionary is not necessarily 
the backing store of the data. The process variables for example are 
just linked into the objdict. The application or the process image 
provides the backing store. In the end we can find any appropriate 
structure to pass the configuration from userspace to the data link 
layer and the PDO module in the kernel.

The PDO module is in fact a programmable scatter-gather copy machine 
(like DMA) between process image and Ethernet frames and vice-versa. The 
information of what to copy to where comes from the object dictionary. 
But it is possible to extract this information from the objdict and pass 
it via generic structures (e.g. something like IO vectors) to the PDO 
module in kernel. The information flow of the configuration data is 
one-way only, from userspace to kernel. This is what I plan to implement 
in openPOWERLINK, because the copy information can also be passed to a 
special hardware like a DMA controller.

So you can implement the objdict in userspace and access the process 
image via mmap (e.g. libpv).

cu,
   Daniel

--
SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz

Telefon  : +49 (0) 3661 6279 0
Fax      : +49 (0) 3661 6279 99
Email    : daniel.krueger@systec-electronic.com
Internet : http://www.systec-electronic.com

Managing Director   : Dipl.-Phys. Siegmar Schmidt
Commercial registry : Amtsgericht Jena, HRB 205563

  reply	other threads:[~2009-03-20 15:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 18:32 The Linux Staging tree, what it is and is not Greg KH
2009-03-20  0:58 ` Robert Schwebel
2009-03-20  2:48   ` Greg KH
2009-03-20  8:34     ` Daniel Krüger
2009-03-20  8:46       ` Robert Schwebel
2009-03-20 17:25       ` Greg KH
2009-03-20 10:01   ` Alan Cox
2009-03-20 10:35     ` Robert Schwebel
2009-03-20 10:55       ` Alan Cox
2009-03-20 11:15         ` Robert Schwebel
2009-03-20 15:16           ` Daniel Krüger [this message]
2009-03-20 15:37             ` Alan Cox
2009-03-20 20:32               ` david
2009-03-23  9:03                 ` Daniel Krüger
2009-03-23  9:16                   ` Robert Schwebel
2009-03-20  4:26 ` Dave Airlie
2009-03-20  4:46   ` Greg KH
2009-03-20 16:05   ` Lubomir Rintel

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=49C3B33F.1020905@systec-electronic.com \
    --to=daniel.krueger@systec-electronic.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=mol@pengutronix.de \
    --cc=r.schwebel@pengutronix.de \
    --cc=tglx@linutronix.de \
    --cc=wsa@pengutronix.de \
    /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