mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
selftests: forwarding: ETS: Use Qdisc counters
Currently the SW-datapath ETS selftests use "ip link" stats to obtain the number of packets that went through a given band. mlxsw then uses ethtool per-priority counters. Instead, change both to use qdiscs. In SW datapath this is the obvious choice, and now that mlxsw offloads FIFO, this should work on the offloaded datapath as well. This has the effect of verifying that the FIFO offload works. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7bec1a45d5
commit
b9b72999eb
@@ -56,11 +56,19 @@ switch_destroy()
|
||||
}
|
||||
|
||||
# Callback from sch_ets_tests.sh
|
||||
get_stats()
|
||||
collect_stats()
|
||||
{
|
||||
local band=$1; shift
|
||||
local -a streams=("$@")
|
||||
local stream
|
||||
|
||||
ethtool_stats_get "$h2" rx_octets_prio_$band
|
||||
# Wait for qdisc counter update so that we don't get it mid-way through.
|
||||
busywait_for_counter 1000 +1 \
|
||||
qdisc_parent_stats_get $swp2 10:$((${streams[0]} + 1)) .bytes \
|
||||
> /dev/null
|
||||
|
||||
for stream in ${streams[@]}; do
|
||||
qdisc_parent_stats_get $swp2 10:$((stream + 1)) .bytes
|
||||
done
|
||||
}
|
||||
|
||||
bail_on_lldpad
|
||||
|
||||
Reference in New Issue
Block a user