rtnet code in rtai_24.1.12 (from denx)

Jan Kiszka kiszka at rts.uni-hannover.de
Fri Oct 15 18:14:27 CEST 2004

Paolo Mantegazza wrote:
> deepa.vijayaraghavan at mbtech-group.com wrote:
>> Hello, Thanks a lot for the details.
>> One newbie question:
>> The code you have provided is an interface that enables calling the linux
>> kernel socket interface directly from the RTAI module. Am I correct?
>> How is RTNET different from this? I mean, since RTNET is hard real 
>> time, I
>> think it does more in terms of converting the drivers etc., to enable 
>> hard
>> realtime. Is my understanding correct?
>> Hence, when I use the kernel socket calls, I do not have hard real time.
>> For my application this interface is probably what I need. But as a 
>> person
>> new to all this, I am just curious to learn & understand more.
>> If you could point me to some documents/links that explain more about
>> this(normal kernel drivers & hard realtime drivers), it will be great!

Hard real-time networking like RTnet basically has to fulfil these 

  o Bounded execution time in all real-time code paths, both in the
    drivers and in the stack. Setup and shutdown can typically remain

  o Strict resource management (bandwidth, CPU time in common code paths,
    packet buffers, etc.)

And additionally when doing communication over unmodified Ethernet:
  o Media access control which reliably avoids collisions (when using
    hubs) or congestions (in switches)

Some more information can be found on rtnet.sf.net. And for even more 
details about how RTnet actually achieves this, you are on the wrong 
mailing list ;).

> Correct, the functions provided are not for real time, they use plain 
> Linux.
> I think there is no need for a more specific documentation. When in the 
> need of using both Linux and RTNet for the same application you have to 
> care of the coding. In RTAI netrpc.c there is the simple way we adopted. 
> An example application integrating Linux and RTNet networking can be 
> found at: http://www.aero.polimi.it/~mbdyn/mbdyn-rt/index.html.

You can use Linux networking on top of RTnet, i.e. in spare time without 
interfering with critical data.


More information about the Rtai mailing list