Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
c09e2e8d
Commit
c09e2e8d
authored
May 22, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into measure-analysis
parents
da9d12cc
6648f6d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
README.md
README.md
+19
-1
scripts/create_qdisc
scripts/create_qdisc
+41
-0
No files found.
README.md
View file @
c09e2e8d
#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
scripts/create_qdisc
0 → 100644
View file @
c09e2e8d
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment