selftests: mlxsw: Add a RED selftest
This tests that below the queue minimum length, there is no dropping / marking, and above max, everything is dropped / marked. The test is structured as a core file with topology and test code, and three wrappers: one for RED used as a root Qdisc, and two for testing (W)RED under PRIO and ETS. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4113b04823
commit
3de611b507
@@ -607,6 +607,16 @@ ethtool_stats_get()
|
||||
ethtool -S $dev | grep "^ *$stat:" | head -n 1 | cut -d: -f2
|
||||
}
|
||||
|
||||
qdisc_stats_get()
|
||||
{
|
||||
local dev=$1; shift
|
||||
local handle=$1; shift
|
||||
local selector=$1; shift
|
||||
|
||||
tc -j -s qdisc show dev "$dev" \
|
||||
| jq '.[] | select(.handle == "'"$handle"'") | '"$selector"
|
||||
}
|
||||
|
||||
humanize()
|
||||
{
|
||||
local speed=$1; shift
|
||||
|
Reference in New Issue
Block a user