[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6cb7957-1a54-4386-8e10-17cea49851df@lunn.ch>
Date: Wed, 12 Feb 2025 03:23:01 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Gerhard Engleder <gerhard@...leder-embedded.com>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, Oleksij Rempel <o.rempel@...gutronix.de>
Subject: Re: [PATCH net-next v6 6/7] net: selftests: Export
net_test_phy_loopback_*
On Sun, Feb 09, 2025 at 08:08:26PM +0100, Gerhard Engleder wrote:
> net_selftests() provides a generic set of selftests for netdevs with
> PHY. Those selftests rely on an existing link to inherit the speed for
> the loopback mode.
>
> net_selftests() is not designed to extend existing selftests of drivers,
> but with net_test_phy_loopback_* it contains useful test infrastructure.
It might not of originally been designed for that, but i think it can
be used as an extension. I've done the same for statistics, which uses
the same API.
For get_sset_count() you call net_selftest_get_count() and then add on
the number of driver specific tests. For ethtool_get_strings() first
call net_selftest_get_strings() and then append the driver tests
afterwards. For self_test, first call net_selftest() and then do the
driver specific tests.
I also think you can extend these tests to cover different speeds.
There are plenty of ethtool_test_flags bit free, so you can use one of
them to indicate the reserved value in ethtool_test contains a speed.
Everybody then gains from your work.
Andrew
Powered by blists - more mailing lists