Skip to content

Commit

Permalink
selftests: mlxsw: Test offloadability of root TBF
Browse files Browse the repository at this point in the history
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: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Petr Machata authored and Jakub Kicinski committed Oct 29, 2021
1 parent 48e4d00 commit 3d5290e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/testing/selftests/drivers/net/mlxsw/sch_offload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

ALL_TESTS="
test_root
test_port_tbf
test_etsprio
test_etsprio_port_tbf
"
NUM_NETIFS=1
lib_dir=$(dirname $0)/../../../net/forwarding
Expand Down Expand Up @@ -221,6 +223,12 @@ test_root()
do_test_combinations 1 0
}

test_port_tbf()
{
with_tbf 1: root \
do_test_combinations 8 1
}

do_test_etsprio()
{
local parent=$1; shift
Expand Down Expand Up @@ -264,6 +272,12 @@ test_etsprio()
do_test_etsprio root ""
}

test_etsprio_port_tbf()
{
with_tbf 1: root \
do_test_etsprio "parent 1:1" "-TBF"
}

cleanup()
{
tc qdisc del dev $h1 root &>/dev/null
Expand Down

0 comments on commit 3d5290e

Please sign in to comment.