File Index
Files and directories
Sign in
FILE

sch_tbf_root.sh

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/net/forwarding/sch_tbf_root.sh BASH
 1#!/bin/bash
 2# SPDX-License-Identifier: GPL-2.0
 3
 4ALL_TESTS="
 5	ping_ipv4
 6	tbf_test
 7"
 8: ${lib_dir:=.}
 9source $lib_dir/sch_tbf_core.sh
10
11tbf_test_one()
12{
13	local bs=$1; shift
14
15	tc qdisc replace dev $swp2 root handle 108: tbf \
16	   rate 400Mbit burst $bs limit 1M
17	defer tc qdisc del dev $swp2 root
18
19	do_tbf_test 10 400 $bs
20}
21
22tbf_test()
23{
24	tbf_test_one 128K
25}
26
27if type -t sch_tbf_pre_hook >/dev/null; then
28	sch_tbf_pre_hook
29fi
30
31trap cleanup EXIT
32
33setup_prepare
34setup_wait
35
36tests_run
37
38exit $EXIT_STATUS
~/ Read-only file preview.