linux/tools/testing/selftests/net/forwarding/sch_ets.sh
Davide Caratti 774a2ae661 selftests: net/forwarding: test purge of active DWRR classes
Extend sch_ets.sh to add a reproducer for problematic list deletions when
active DWRR class are purged by ets_qdisc_change() [1] [2].

[1] https://lore.kernel.org/netdev/e08c7f4a6882f260011909a868311c6e9b54f3e4.1639153474.git.dcaratti@redhat.com/
[2] https://lore.kernel.org/netdev/f3b9bacc73145f265c19ab80785933da5b7cbdec.1754581577.git.dcaratti@redhat.com/

Suggested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Victor Nogueira <victor@mojatatu.com>
Link: https://patch.msgid.link/489497cb781af7389011ca1591fb702a7391f5e7.1755016081.git.dcaratti@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-08-13 18:11:48 -07:00

44 lines
760 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# A driver for the ETS selftest that implements testing in slowpath.
lib_dir=.
source sch_ets_core.sh
ALL_TESTS="
ping_ipv4
priomap_mode
ets_test_strict
ets_test_mixed
ets_test_dwrr
ets_test_plug
classifier_mode
ets_test_strict
ets_test_mixed
ets_test_dwrr
"
switch_create()
{
ets_switch_create
# Create a bottleneck so that the DWRR process can kick in.
tc qdisc add dev $swp2 root handle 1: tbf \
rate 1Gbit burst 1Mbit latency 100ms
defer tc qdisc del dev $swp2 root
PARENT="parent 1:"
}
# Callback from sch_ets_tests.sh
collect_stats()
{
local -a streams=("$@")
local stream
for stream in ${streams[@]}; do
qdisc_parent_stats_get $swp2 10:$((stream + 1)) .bytes
done
}
ets_run