1 % Created 2010-09-30 Čt 12:40
2 \documentclass[11pt]{scrartcl}
3 \usepackage[utf8]{inputenc}
4 % \usepackage[T1]{fontenc}
19 breaklinks = true, %allow links to break over lines
20 pdffitwindow = true, %resize document window to fit document size
22 % linkcolor = darkblue,
23 % citecolor = darkblue,
24 % urlcolor = darkblue,
30 \providecommand{\alert}[1]{\textbf{#1}}
32 \title{Planning of SocketCAN gateway evaluation}
33 \author{M. Sojka, P. Píša, Z. Hanzáelk\\
34 Czech Technical University in Prague}
35 \date{September 30, 2010}
41 % \setcounter{tocdepth}{1}
45 % \section{Introduction}
46 % \label{sec:introduction}
49 This document specifies how the (mostly) temporal properties of
50 SocketCAN-based CAN gateway will be evaluated.
52 \section{Hardware setup}
56 We will use two hardware configurations for our experiments.
59 \item A single PC with Kvaser PCI quad-CAN card.
60 \item A single PC with Kvaser PCI quad-CAN card plus CAN gateway running
65 The first HW configuration, depicted in Figure \ref{fig:c1}, will be
66 used to measure the timing properties of communication between two CAN
67 interfaces in a single computer (PC) connected to the same CAN bus,
68 i.e. we will send messages from can0 and receive them on can1. The PC
69 will serve in further experiments as a load generator and measuring
70 system. These results be used later to determine which part of latency
71 is contributed by the PC and not by the measured gateway.
77 \includegraphics[scale=.5]{configuration1.png}
78 \caption{PC-only configuration}
81 In the second HW configuration (Fig. \ref{fig:c2}) messages will be
82 send from one interface on the PC (can0) and the gateway will route
83 them to the second bus connected to another interface on the same PC
84 (can2). Optionally, additional interface (can1) will be connected to
85 the same bus as can0 and we will use the reception timestamp on this
86 interface to determine the time when the message appeared on the bus
92 \includegraphics[scale=.5]{configuration2.png}
93 \caption{Configuration with PC and the gateway}
96 \section{Measurement software}
99 We intend to develop an application that will run on the PC and will
100 be responsible for test traffic generation and measurement of the
101 communication latencies. The traffic will be generated on one
102 interface and received on the other(s) in the same computer.
103 Therefore, the TX and RX timestamps will be measured by the same clock
104 (TSC/HPET) which allows precise measurement of the latencies.
105 \subsection{Traffic generator}
109 We plan to generate traffic in several possible modes:
111 \item Send the messages as fast as possible to fully utilize the bus and
112 to check that gateway/driver does not drop messages. TX queue on
113 the PC will be almost always full. For that reason the time when
114 the message is put into the queue will be different from the time
115 the message appears on the bus. The later time will be determined
116 by receiving the message on can1.
117 \item Send the message only after the corresponding message is received
118 on the second interface. In this case there will be at most one
119 message in the TX queue and time between sending on can0 and
120 receiving on can1 should be short.
121 \item (Optional) Burst sequences, but not continuous bus load. This mode
122 will be used if the GW does not survive continuous traffic to find
123 the maximum burst size that can be safely handled.
127 The generator will be able to generate different ID/length/data
128 patterns similarly as \texttt{cangen}.
129 \section{Gateway configuration}
132 \subsection{Kernel versions}
133 \label{sec:kernel-versions}
134 We want to run the gateway with vanilla and rt\_preempt kernels.
135 Currently we run 2.6.31 kernels on our board but we want to upgrade to
136 2.6.33 (so far -rt is available only for .33) and run the experiments
137 on these newer kernel. We do not expect major problems with upgrading.
139 \subsection{One-way traffic}
140 \label{sec:one-way-traffic}
141 We plan to test the following gateway configurations (and maybe even
142 combinations of these configurations):
144 \item Routing of all frames, without modifications
145 \item Routing of selected frames only, without modifications
146 \item Routing of all/selected frames with modifications
148 \item different type of modifications (and/or/xor/set/crc)
149 \item different number of modifications per ``job''
152 \item Routing of either SFF or ELF frames only (there should be
153 difference because of how \texttt{can\_rcv\_filter()} is implemented.
156 \subsection{Bi-directional traffic}
157 \label{sec:bi-direct-gatew}
159 It will be interesting to investigate the behavior of the gateway with
160 bi-directional traffic, i.e. the PC will generate traffic on both can0
161 and can3. If both busses are fully utilized by the traffic generator,
162 some messages must definitely be dropped at some point. We expect that
163 the low priority messages will be dropped and it will be seen whether
164 this is true in reality.
166 \section{Presentation of results}
168 The measured latencies of individual messages will be statistically
169 processed and histograms (latency profiles) will be generated from the
170 data. Latency profile (see the example from our previous benchmark in
171 Figure \ref{fig:lp}) is a sort of reverse-cumulative histogram with
172 logarithmic vertical axis. The advantage of using latency profiles is
173 that the worst-case behavior (bottom right part of the graph) is
174 ``magnified'' by the logarithmic scale.
178 \includegraphics{ethflood.pdf}
179 \caption{Latency profile from our previous benchmark}
186 \item Are the hardware configurations sufficient for you or are you
187 interested in different setups?
188 \item In the case of lost messages, are you interested in detailed
189 statistics of which messages are lost, etc?
190 \item Are you interested in measuring any other gateway
192 \item Are you also interested in what happens when the gateway is
193 loaded by other activities (CPU, Ethernet, etc.)?