From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Robert Schwebel <r.schwebel@pengutronix.de>,
Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
daniel.krueger@systec-electronic.com,
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 11:35:45 +0100 [thread overview]
Message-ID: <20090320103545.GQ5367@pengutronix.de> (raw)
In-Reply-To: <20090320100146.6599f671@lxorguk.ukuu.org.uk>
Hi Alan,
Thanks for your feedback! :-)
On Fri, Mar 20, 2009 at 10:01:46AM +0000, Alan Cox wrote:
> > However, I'm still not convinced that this is the right way to go. What
> > you want to do for the main APIs is provide some nice userspace library
> > API for your applications. Why not put the whole "stack" into userspace
> > then and connect it to the kernel only via raw socket.
>
> - Security
For industrial I/O? We are talking about transportation of analog and
digital I/O, relais, ADC input etc. The only part that I'd consider
security related is tunnel traffic; EPL and EtherCAT have the
possibiltiy to do ethernet-over-$TECHNOLOGY. In the userspace variant,
tunnel trafic would be pushed back into the stack via tun/tap.
> - Compartmentalisation
Yes, that's a good and valid point, IMHO. Also, from a political point
of view, it would be very good to have *the one and only* kernel way to
do these things, instead of myriards of incompatible userspace hacks.
> - Sharing the device/interconnect
Sharing the device works also with userspace, because the device is a
network card and the interface is raw ethernet frames. What do you mean
with interconnect?
> - Real time prioritisation
Would be done by giving the kernel task (with threaded interrupts) or
userspace task the right POSIX relatime priorities, so I don't see a
difference here.
> > What do others think? Is it worth the effort to invent a proper objdict
> > API for linux?
>
> Objdict appears to be a legacy wart
Don't tell that to the industrial networking people - they are very
proud of the fact that they use a "standardized application API", so
even the fanciest and newest industrial ethernet technologies are based
on that legacy wart objdict, and it is officially considered to be a
*feature*.
> and can stay where it belongs I suspect -
So where does it belong, kernel or userspace? I'd say userspace, but
then you can put the whole stack into userspace. If kernel, we would
need an objdict API to userspace...?
One thing that has to be considered is that messages often have to be
handled fast and under realtime constraints; for example, it must be
possible to hook up the userspace to certain changes in the objdict.
Something like:
------- --------- --------------
eth objdict process data
can layer
------- --------- --------------
| | |
| rx() | |
|--------->| |
| # write pdo into |
| # position in |
| # objdict |
| | |
| | pdo_changed() |
| |--------------->|
| | # pull process data out of certain
| | # position in the objdict and make
| | # proper process variable objects
| | #
| | |
Note that what they are doing is to use the objdict as a binary config
space (think registers) to configure the whole network workflow; so if
for example somebody wants to send out a temperature every delta-t
seconds, he configures that by setting bits in the objdict, pushing the
process data (temperature) into other bits in the objdict and the stack
sends out can/eth frames with that data. It's a complete mixture of
ISO/OSI layers, because they have things like "what is to be sent when"
in the same binary blob space as "payload".
> you might need to have a objdict -> 21st century conversion library
> for the afflicted.
That's what we are working on in the OSADL Fieldbus Framework, in
userspace. The basic idea is to bring the fieldbusses together with the
mathematics developed in the Ptolemy II project [1], in a way that you
can do classic soft-PLC [2] / IEC61131 stuff as well as modern
heterogenous model based design (thing LabVIEW, Matlab/Simulink,
Rhapsody, ...).
> We don't put specialised COBOL support in the kernel either we let
> user space figure out how to cope with the funnies.
Industrial communication people are in some strange time loop that
started looping in the 80es, but didn't notice yet :-)
rsc
[1] http://ptolemy.berkeley.edu/ptolemyII/
[2] http://en.wikipedia.org/wiki/Programmable_logic_controller
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2009-03-20 10:36 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 [this message]
2009-03-20 10:55 ` Alan Cox
2009-03-20 11:15 ` Robert Schwebel
2009-03-20 15:16 ` Daniel Krüger
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=20090320103545.GQ5367@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=daniel.krueger@systec-electronic.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=mol@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