From: Roger Quadros <rogerq@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, shuah@kernel.org, s-vadapalli@ti.com,
r-gunasekaran@ti.com, vigneshr@ti.com, srk@ti.com,
horms@kernel.org, p-varis@ti.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.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
Date: Mon, 18 Dec 2023 14:39:03 +0200 [thread overview]
Message-ID: <dc691a01-5b70-448c-bed3-fcd6819c4bc5@kernel.org> (raw)
In-Reply-To: <20231215172710.v6gtreijeqzocmv4@skbuf>
On 15/12/2023 19:27, Vladimir Oltean wrote:
> 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".
>
Thanks for catching this. Will fix in next spin.
> $ ./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
>>
--
cheers,
-roger
next prev parent reply other threads:[~2023-12-18 12:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 13:20 [PATCH net-next v9 00/10] net: ethernet: am65-cpsw: Add mqprio, frame pre-emption & coalescing Roger Quadros
2023-12-15 13:20 ` [PATCH net-next v9 01/10] selftests: forwarding: ethtool_mm: support devices with higher rx-min-frag-size Roger Quadros
2023-12-15 13:20 ` [PATCH net-next v9 02/10] selftests: forwarding: ethtool_mm: fall back to aggregate if device does not report pMAC stats Roger Quadros
2023-12-15 17:27 ` Vladimir Oltean
2023-12-18 12:39 ` Roger Quadros [this message]
2023-12-15 13:20 ` [PATCH net-next v9 03/10] net: ethernet: am65-cpsw: Build am65-cpsw-qos only if required Roger Quadros
2023-12-15 16:10 ` Vladimir Oltean
2023-12-15 13:20 ` [PATCH net-next v9 04/10] net: ethernet: am65-cpsw: Rename TI_AM65_CPSW_TAS to TI_AM65_CPSW_QOS Roger Quadros
2023-12-15 16:10 ` Vladimir Oltean
2023-12-15 13:20 ` [PATCH net-next v9 05/10] net: ethernet: am65-cpsw: cleanup TAPRIO handling Roger Quadros
2023-12-15 16:13 ` Vladimir Oltean
2023-12-15 13:20 ` [PATCH net-next v9 06/10] net: ethernet: ti: am65-cpsw: Move code to avoid forward declaration Roger Quadros
2023-12-15 13:20 ` [PATCH net-next v9 07/10] net: ethernet: am65-cpsw: Move register definitions to header file Roger Quadros
2023-12-15 13:20 ` [PATCH net-next v9 08/10] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode Roger Quadros
2023-12-15 17:15 ` Vladimir Oltean
2023-12-18 13:43 ` Simon Horman
2023-12-18 15:34 ` Roger Quadros
2023-12-15 13:20 ` [PATCH net-next v9 09/10] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support Roger Quadros
2023-12-15 13:20 ` [PATCH net-next v9 10/10] net: ethernet: ti: am65-cpsw: add sw tx/rx irq coalescing based on hrtimers Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc691a01-5b70-448c-bed3-fcd6819c4bc5@kernel.org \
--to=rogerq@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p-varis@ti.com \
--cc=pabeni@redhat.com \
--cc=r-gunasekaran@ti.com \
--cc=s-vadapalli@ti.com \
--cc=shuah@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox