You are here: Home / Science / RTLWS Submitted Papers / 
2020-01-28 - 22:02
Details of the Real Time Linux Foundation Working Group Project

OSADL Project: Real Time Linux Workshops

Real Time Linux Foundation Workshops since 1999

Real Time Linux Workshops

1999 - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 - 2010 - 2011 - 2012 - 2013 - 2014 - 2015

Eleventh Real-Time Linux Workshop on September 28 to 30, in Dresden, Germany


Timing analysis of Linux CAN drivers

Michal Sojka, Czech Technical University
Pavel Pisa, Czech Technical University

CAN-bus (Controller-Area Network) is widely used communication bus in industrial and automotive systems. Besides that it simplifies wirings, CAN-bus offers deterministic medium access algorithm for which it is very suitable for certain type of time-critical applications. Typical CAN-based network consists of multiple microcontrollers and one or a few more complex nodes which implement higher-level control algorithms. These more complex nodes can run Linux OS so there is a need for CAN-bus drivers. There exist several projects which offer CAN drivers for Linux. Probably the most known driver is Socket-CAN, which is already partially included in the mainline kernel. Another option is LinCAN driver. The basic difference between these two drivers is that Socket-CAN is built around standard Linux networking infrastructure, whereas LinCAN is a character device driver with its own queuing infrastructure.

We have developed a tool for measuring delays on CAN-bus and use it in several tests which measure delays under different system loads and other conditions.

The results of this work are useful for the following reasons:

  1. Users can approximately know timing properties of a particular CAN-on-Linux solutions.
  2. Developed tools can be used for benchmarking other hardware to find suitability for intended applications.
  3. Driver developers can profile and improve their drivers and find factors contributing to worst-case delays in RX/TX paths.
  4. Overhead caused by the use of generic Linux networking infrastructure in Socket-CAN implementation was quantified. Our finding is that the difference is not negligible, but it is still suitable for many applications.