1#!/bin/bash
2
3TC="$1"; shift
4ETH="$1"; shift
5
6# The taprio architecture changes the admin schedule from a hrtimer and not
7# from process context, so we need to wait in order to make sure that any
8# schedule change actually took place.
9while :; do
10	has_admin="$($TC -j qdisc show dev $ETH root | jq '.[].options | has("admin")')"
11	if [ "$has_admin" = "false" ]; then
12		break;
13	fi
14
15	sleep 1
16done
17