All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerhard Engleder <gerhard@engleder-embedded.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, Oleksij Rempel <o.rempel@pengutronix.de>
Subject: Re: [PATCH net-next v6 6/7] net: selftests: Export net_test_phy_loopback_*
Date: Wed, 12 Feb 2025 21:13:50 +0100	[thread overview]
Message-ID: <b18971f2-0edf-4fa7-be1b-eec8392665f0@engleder-embedded.com> (raw)
In-Reply-To: <d6cb7957-1a54-4386-8e10-17cea49851df@lunn.ch>

On 12.02.25 03:23, Andrew Lunn wrote:
> 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.

Reusing the complete test set as extension is not feasible as the first
test requires an existing link and for loopback test no link is
necessary. But yes, I can do better and rework it to reusable tests.
I'm not sure if I will use ethtool_test_flags as IMO ideally all tests
run always to ensure easy use.

Thank you for the review!

Gerhard

  reply	other threads:[~2025-02-12 20:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 19:08 [PATCH net-next v6 0/7] Support loopback mode speed selection Gerhard Engleder
2025-02-09 19:08 ` [PATCH net-next v6 1/7] net: phy: Allow loopback speed selection for PHY drivers Gerhard Engleder
2025-02-12  1:53   ` Andrew Lunn
2025-02-09 19:08 ` [PATCH net-next v6 2/7] net: phy: Support speed selection for PHY loopback Gerhard Engleder
2025-02-12  1:48   ` Andrew Lunn
2025-02-12 20:01     ` Gerhard Engleder
2025-02-09 19:08 ` [PATCH net-next v6 3/7] net: phy: micrel: Add loopback support Gerhard Engleder
2025-02-12  1:51   ` Andrew Lunn
2025-02-12 20:03     ` Gerhard Engleder
2025-02-09 19:08 ` [PATCH net-next v6 4/7] net: phy: marvell: Align set_loopback() implementation Gerhard Engleder
2025-02-12  1:53   ` Andrew Lunn
2025-02-09 19:08 ` [PATCH net-next v6 5/7] tsnep: Select speed for loopback Gerhard Engleder
2025-02-12  1:55   ` Andrew Lunn
2025-02-09 19:08 ` [PATCH net-next v6 6/7] net: selftests: Export net_test_phy_loopback_* Gerhard Engleder
2025-02-12  2:23   ` Andrew Lunn
2025-02-12 20:13     ` Gerhard Engleder [this message]
2025-02-12 20:46       ` Andrew Lunn
2025-02-12 21:36         ` Gerhard Engleder
2025-02-12 22:34           ` Andrew Lunn
2025-02-12 22:53             ` Russell King (Oracle)
2025-02-09 19:08 ` [PATCH net-next v6 7/7] tsnep: Add PHY loopback selftests Gerhard Engleder

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=b18971f2-0edf-4fa7-be1b-eec8392665f0@engleder-embedded.com \
    --to=gerhard@engleder-embedded.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.