[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231211120138.5461-3-rogerq@kernel.org>
Date: Mon, 11 Dec 2023 14:01:38 +0200
From: Roger Quadros <rogerq@...nel.org>
To: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
shuah@...nel.org,
vladimir.oltean@....com
Cc: s-vadapalli@...com,
r-gunasekaran@...com,
vigneshr@...com,
srk@...com,
horms@...nel.org,
p-varis@...com,
netdev@...r.kernel.org,
rogerq@...nel.org
Subject: [PATCH 2/2] selftests: forwarding: ethtool_mm: support devices that don't support pmac stats
Some devices do not support individual 'pmac' and 'emac' stats.
For such devices, resort to 'aggregate' stats.
Signed-off-by: Roger Quadros <rogerq@...nel.org>
---
tools/testing/selftests/net/forwarding/ethtool_mm.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/ethtool_mm.sh b/tools/testing/selftests/net/forwarding/ethtool_mm.sh
index 6212913f4ad1..e3f2e62029ca 100755
--- a/tools/testing/selftests/net/forwarding/ethtool_mm.sh
+++ b/tools/testing/selftests/net/forwarding/ethtool_mm.sh
@@ -26,6 +26,13 @@ traffic_test()
local delta=
before=$(ethtool_std_stats_get $if "eth-mac" "FramesTransmittedOK" $src)
+ # some devices don't support individual pmac/emac stats,
+ # use aggregate stats for them.
+ if [ "$before" == null ]; then
+ src="aggregate"
+ before=$(ethtool_std_stats_get $if "eth-mac" "FramesTransmittedOO
+K" $src)
+ fi
$MZ $if -q -c $num_pkts -p 64 -b bcast -t ip -R $PREEMPTIBLE_PRIO
--
2.34.1
Powered by blists - more mailing lists