Re: [PATCH net-next v10 0/5] Support loopback mode speed selection

Paolo Abeni
2025-03-20T07:32:39Z

On 3/20/25 7:26 AM, Gerhard Engleder wrote:
> On 12.03.25 21:30, Gerhard Engleder wrote:
>> Previously to commit 6ff3cddc365b ("net: phylib: do not disable autoneg
>> for fixed speeds >= 1G") it was possible to select the speed of the
>> loopback mode by configuring a fixed speed before enabling the loopback
>> mode. Now autoneg is always enabled for >= 1G and a fixed speed of >= 1G
>> requires successful autoneg. Thus, the speed of the loopback mode depends
>> on the link partner for >= 1G. There is no technical reason to depend on
>> the link partner for loopback mode. With this behavior the loopback mode
>> is less useful for testing.
>>
>> Allow PHYs to support optional speed selection for the loopback mode.
>> This support is implemented for the generic loopback support and for PHY
>> drivers, which obviously support speed selection for loopback mode.
>> Additionally, loopback support according to the data sheet is added to
>> the KSZ9031 PHY.
>>
>> Extend phy_loopback() to signal link up and down if speed changes,
>> because a new link speed requires link up signalling.
>>
>> Use this loopback speed selection in the tsnep driver to select the
>> loopback mode speed depending the previously active speed. User space
>> tests with 100 Mbps and 1 Gbps loopback are possible again.
>>
>> v10:
>> - remove selftests, because Anrew Lunn expects a new netlink API for
>> selftests and the selftest patches should wait for it
>>
>
> Hello Andrew,
>
> The patchset now does not touch any selftest code anymore. It now only
> fixes the 1Gbps loopback, which requires a link partner since
> 6ff3cddc365b. tsnep is using the extended phy_loopback() interface
> to select the loopback speed. Also the phy_loopback() usage in tsnep
> could be simplified, because thanks to your review comments link speed
> changes are now signaled correctly by phy_loopback().
>
> I'm curious about the work of Lee Trager and I will definitely take a
> look on it. I will take a look to the netdev 0x19 talk as soon as the
> slides or the recording is available.
>
> I did not get an answer from you to my last reply of v9. That's the
> reason why I decided to post v10 without selftests. How to proceed
> with this changes? The development cycle is near the end, so maybe
> you want to delay this change to the beginning of the next development
> cycle?

FTR, I reached for Andrew off-list and he is ok with v10. Given the
large PW backlog and the upcoming merge window, I'm going to apply the
patches possibly before his explicit ack on the ML.

/P