Commit c09e2e8d authored by Joanne Hugé's avatar Joanne Hugé

Merge branch 'master' into measure-analysis

parents da9d12cc 6648f6d7
#Packet Exchange repository
# tsn-rt-measures repository
clockres, latency-measure and packet-exchange are C programs wrote using
the same structure as cyclictest, and borrows large portions of the cyclictest
code:
They have a real-time thread doing measurements or time sensitive operations
at regular intervals, and a non real-time thread doing the I/O operations to
report the results shared by the real-time thread.
The real-time thread can be assigned to CPU1 (which I chose to isolate on the Olimex boards) and
can have it's priority set as an option, default is to 99. It writes results in a static structure.
* clockres is used to determine the resolution of the clock (CLOCK_MONOTONIC), by doing successive
calls to clock_gettime
* latency-measure is used to determine the maximum wakeup latency of a real-time thread. It is
a simplified version of cyclictest I wrote to have a better understanding and more control.
* packet-exchange has a client and a server, which exchange UDP ethernet packets using real-time threads,
and can send them on a ETF qdisc by setting a txtime timestamp.
* scripts contain useful bash scripts to be used on the boards
#!/bin/bash
usage() {
echo "Usage: $0 -e delta|-p" 1>&2;
exit 1;
}
while getopts "e:p" opt; do
case "${opt}" in
e )
delta=${OPTARG}
use_etf=1
;;
p )
use_pfast=1
;;
* )
usage
;;
esac
done
shift $((OPTIND-1))
if [ -z "${use_etf}" ] && [ -z "${use_pfast}" ]; then
usage
fi
if [ -n "${use_etf}" ] && [ -n "${use_pfast}" ]; then
usage
fi
if [ -n "${use_etf}" ]; then
echo "Creating ETF qdisc with delta $delta"
tc qdisc del root dev eth0;
tc qdisc add dev eth0 parent root handle 100 prio bands 2 priomap 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1;
tc qdisc add dev eth0 parent 100:1 etf clockid CLOCK_TAI delta $delta;
tc qdisc show dev eth0;
elif [ -n "${use_pfast}" ]; then
echo "Creating pfast qdisc"
tc qdisc del root dev eth0;
tc qdisc show;
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment