1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4# A driver for the ETS selftest that implements testing in slowpath. 5lib_dir=. 6source sch_ets_core.sh 7 8ALL_TESTS=" 9 ping_ipv4 10 priomap_mode 11 ets_test_strict 12 ets_test_mixed 13 ets_test_dwrr 14 classifier_mode 15 ets_test_strict 16 ets_test_mixed 17 ets_test_dwrr 18" 19 20switch_create() 21{ 22 ets_switch_create 23 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 100ms 27 PARENT="parent 1:" 28} 29 30switch_destroy() 31{ 32 ets_switch_destroy 33 tc qdisc del dev $swp2 root 34} 35 36# Callback from sch_ets_tests.sh 37get_stats() 38{ 39 local stream=$1; shift 40 41 link_stats_get $h2.1$stream rx bytes 42} 43 44ets_run 45