lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231215172710.v6gtreijeqzocmv4@skbuf>
Date: Fri, 15 Dec 2023 19:27:10 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: Roger Quadros <rogerq@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, shuah@...nel.org, s-vadapalli@...com,
	r-gunasekaran@...com, vigneshr@...com, srk@...com, horms@...nel.org,
	p-varis@...com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v9 02/10] selftests: forwarding: ethtool_mm:
 fall back to aggregate if device does not report pMAC stats

On Fri, Dec 15, 2023 at 03:20:40PM +0200, Roger Quadros wrote:
> diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
> index 8f6ca458af9a..763c262a3453 100755
> --- a/tools/testing/selftests/net/forwarding/lib.sh
> +++ b/tools/testing/selftests/net/forwarding/lib.sh
> @@ -146,6 +146,15 @@ check_ethtool_mm_support()
>  	fi
>  }
>  
> +check_ethtool_pmac_std_stats_support()
> +{
> +	local dev=$1; shift
> +	local grp=$1; shift
> +
> +	[ 0 -ne $(ethtool --json -S $dev --all-groups --src pmac 2>/dev/null \
> +		| jq '.[]."$grp" | length') ]

This is broken. $grp inside single quotes will search for the plain-text
"$grp" string, not for the $grp bash variable. Use ".[].\"$grp\" | length".

$ ./ethtool_mm.sh eno0 swp0
eno0 does not report pMAC statistics, falling back to aggregate
swp0 does not report pMAC statistics, falling back to aggregate
$ ethtool -S swp0 --all-groups --src pmac
Standard stats for swp0:
eth-phy-SymbolErrorDuringCarrier: 0
eth-mac-FramesTransmittedOK: 90017
eth-mac-FramesReceivedOK: 90033
eth-mac-FrameCheckSequenceErrors: 0
eth-mac-AlignmentErrors: 0
eth-mac-OctetsTransmittedOK: 9181138
eth-mac-OctetsReceivedOK: 9182112
eth-mac-MulticastFramesXmittedOK: 17
eth-mac-BroadcastFramesXmittedOK: 90000
eth-mac-MulticastFramesReceivedOK: 33
eth-mac-BroadcastFramesReceivedOK: 90000
eth-mac-FrameTooLongErrors: 0
eth-ctrl-MACControlFramesReceived: 0
rmon-etherStatsUndersizePkts: 0
rmon-etherStatsOversizePkts: 0
rmon-etherStatsFragments: 0
rmon-etherStatsJabbers: 0
rx-rmon-etherStatsPkts64to64Octets: 33
rx-rmon-etherStatsPkts65to127Octets: 90000
rx-rmon-etherStatsPkts128to255Octets: 0
rx-rmon-etherStatsPkts256to511Octets: 0
rx-rmon-etherStatsPkts512to1023Octets: 0
rx-rmon-etherStatsPkts1024to1526Octets: 0
rx-rmon-etherStatsPkts1527to65535Octets: 0
tx-rmon-etherStatsPkts64to64Octets: 12
tx-rmon-etherStatsPkts65to127Octets: 90005
tx-rmon-etherStatsPkts128to255Octets: 0
tx-rmon-etherStatsPkts256to511Octets: 0
tx-rmon-etherStatsPkts512to1023Octets: 0
tx-rmon-etherStatsPkts1024to1526Octets: 0
tx-rmon-etherStatsPkts1527to65535Octets: 0

> +}
> +
>  check_locked_port_support()
>  {
>  	if ! bridge -d link show | grep -q " locked"; then
> -- 
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ