From 77005ce60d7eaccb2b634853e96b1841e1f24f54 Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Thu, 25 Oct 2018 15:06:29 +0300 Subject: use batch file for tc convifguration Signed-off-by: Ilias Apalodimas --- scripts/setup-taprio.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/setup-taprio.sh b/scripts/setup-taprio.sh index 76455f9..684b0ff 100755 --- a/scripts/setup-taprio.sh +++ b/scripts/setup-taprio.sh @@ -2,16 +2,23 @@ . scripts/lava-common.sh +batch='taprio.batch' iface=$(find_vland_iface) -i=$((`date +%s%N` + 37000000000 + (2 * 60 * 1000000000))) +# 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))) -tc 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 \ +cat > $batch <