Commit 3d5290ea authored by Petr Machata's avatar Petr Machata Committed by Jakub Kicinski

selftests: mlxsw: Test offloadability of root TBF

TBF can be used as a root qdisc, with the usual ETS/RED/TBF hierarchy below
it. This use should now be offloaded. Add a test that verifies that it is.
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 48e4d00b
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
ALL_TESTS=" ALL_TESTS="
test_root test_root
test_port_tbf
test_etsprio test_etsprio
test_etsprio_port_tbf
" "
NUM_NETIFS=1 NUM_NETIFS=1
lib_dir=$(dirname $0)/../../../net/forwarding lib_dir=$(dirname $0)/../../../net/forwarding
...@@ -221,6 +223,12 @@ test_root() ...@@ -221,6 +223,12 @@ test_root()
do_test_combinations 1 0 do_test_combinations 1 0
} }
test_port_tbf()
{
with_tbf 1: root \
do_test_combinations 8 1
}
do_test_etsprio() do_test_etsprio()
{ {
local parent=$1; shift local parent=$1; shift
...@@ -264,6 +272,12 @@ test_etsprio() ...@@ -264,6 +272,12 @@ test_etsprio()
do_test_etsprio root "" do_test_etsprio root ""
} }
test_etsprio_port_tbf()
{
with_tbf 1: root \
do_test_etsprio "parent 1:1" "-TBF"
}
cleanup() cleanup()
{ {
tc qdisc del dev $h1 root &>/dev/null tc qdisc del dev $h1 root &>/dev/null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment