blob: 63f862f5efa7f8c5c7cacdd817557cdf7858e616 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
. scripts/lava-common.sh
batch='taprio.batch'
iface=$(find_vland_iface)
# 37 seconds is the TAI-UTC offset. Start it after 5 seconds
i=$((`date +%s%N` + 37000000000 + (5 * 1000000000)))
# round it down
base=$(($i - ($i % 1000000000)))
# TODO make sched entries configurable
cat > $batch <<EOF
qdisc replace dev "$iface" parent root handle 100 taprio \
num_tc 3 \
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
queues 1@0 1@1 2@2 \
base-time "$base" \
sched-entry S 01 300000 \
sched-entry S 02 300000 \
sched-entry S 04 400000 \
clockid CLOCK_TAI
EOF
tc -b $batch
|