brintos

brintos / linux-shallow public Read only

0
0
Text · 781 B · e60c8b4 Raw
48 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4# A driver for the ETS selftest that implements testing in slowpath.5lib_dir=.6source sch_ets_core.sh7 8ALL_TESTS="9	ping_ipv410	priomap_mode11	ets_test_strict12	ets_test_mixed13	ets_test_dwrr14	classifier_mode15	ets_test_strict16	ets_test_mixed17	ets_test_dwrr18"19 20switch_create()21{22	ets_switch_create23 24	# Create a bottleneck so that the DWRR process can kick in.25	tc qdisc add dev $swp2 root handle 1: tbf \26	   rate 1Gbit burst 1Mbit latency 100ms27	PARENT="parent 1:"28}29 30switch_destroy()31{32	ets_switch_destroy33	tc qdisc del dev $swp2 root34}35 36# Callback from sch_ets_tests.sh37collect_stats()38{39	local -a streams=("$@")40	local stream41 42	for stream in ${streams[@]}; do43		qdisc_parent_stats_get $swp2 10:$((stream + 1)) .bytes44	done45}46 47ets_run48