🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Matthieu Baerts Tue, 24 Nov 2026 11:29
Re: [PATCH net] selftests: drv-net: pause: detect the link partner from the remote side
#21734
Author: Matthieu Baerts
Date: Tue, 24 Nov 2026 11:29
39 lines
12847 bytes
Hi Maxime,

On 23/11/2026 21:14, Maxime Chevallier (Netdev Foundation) wrote:
> The logic used to detect if the kselftest remote we're interacting with
> is directly connected to us uses link renegotiation to flap the link,
> that way we know if there's a switch between the remote and the DUT.
> 
> However the current logic is racy. It triggers a link renegotiation,
> wait for the link to come back up locally, and looks on the remote if
> the link flap counter changed.
> 
> It's possible that this entire cycle happens locally before the peer
> reports the link flap, in which case it reports that we're not directly
> connected to the peer when we actually are.
> 
> Solve that by reversing the logic : Trigger a link renegotiation on the
> peer, and check if we see the link flap locally. The current
> wait_for_aneg() already waits for a full "up - down - up" cycle, so
> it doens't really matter which side of the link flaps first here.
> 
> This was found in the stmmac CI setup, between an Intel I350-T4 card and
> an iMX8mp + KSZ9131 board. The Pause test was failing seemingly at
> random, due to the link flap occuring either on the host or the remote
> first.

Thank you for the fix, but it looks like it is introducing new issues on
BCM57508:


https://netdev.bots.linux.dev/branch_deltas/net-next-hw-2026-11-24--08-00.html

Do you mind looking at that, and mask this test on your side for the two
boards you mentioned, please? :)

pw-bot: cr

Cheers,
Matt
Re: [PATCH net] selftests: drv-net: pause: detect the link partner from the remote side
#21935
Author: Matthieu Baerts
Date: Tue, 24 Nov 2026 16:15
53 lines
13510 bytes
On 24/11/2026 15:28, Maxime Chevallier wrote:
> On 11/24/26 12:29, Matthieu Baerts wrote:
>> Hi Maxime,
>>
>> On 23/11/2026 21:14, Maxime Chevallier (Netdev Foundation) wrote:
>>> The logic used to detect if the kselftest remote we're interacting with
>>> is directly connected to us uses link renegotiation to flap the link,
>>> that way we know if there's a switch between the remote and the DUT.
>>>
>>> However the current logic is racy. It triggers a link renegotiation,
>>> wait for the link to come back up locally, and looks on the remote if
>>> the link flap counter changed.
>>>
>>> It's possible that this entire cycle happens locally before the peer
>>> reports the link flap, in which case it reports that we're not directly
>>> connected to the peer when we actually are.
>>>
>>> Solve that by reversing the logic : Trigger a link renegotiation on the
>>> peer, and check if we see the link flap locally. The current
>>> wait_for_aneg() already waits for a full "up - down - up" cycle, so
>>> it doens't really matter which side of the link flaps first here.
>>>
>>> This was found in the stmmac CI setup, between an Intel I350-T4 card and
>>> an iMX8mp + KSZ9131 board. The Pause test was failing seemingly at
>>> random, due to the link flap occuring either on the host or the remote
>>> first.
>>
>> Thank you for the fix, but it looks like it is introducing new issues on
>> BCM57508:
>>
>>
>> https://netdev.bots.linux.dev/branch_deltas/net-next-hw-2026-11-24--08-00.html
> 
> Arg seems that on this setup, the remote (I don't know which one it is) doesn't
> support 'ethtool -r', damn :(

These hosts are running Fedora 44. They have ethtool 7.0. I can upgrade
to the latest from F44 repos (7.2) if it can help.

> I'll take another approach then.
> 
>>
>> Do you mind looking at that, and mask this test on your side for the two
>> boards you mentioned, please? :)
> 
> Np, tests are masked on all boards though, I've done more runs and the race
> shows on all of them (all are now connected to the same type of NIC).

Thanks!

Cheers,
Matt
Re: [PATCH net] selftests: drv-net: pause: detect the link partner from the remote side
#21986
Author: Andrew Lunn
Date: Tue, 24 Nov 2026 17:29
16 lines
9256 bytes
> Looks like it's rather the HW or driver that doesn't support this :(
> 
> But that's OK, I think we should ask the least possible features from the
> remotes, the rest of the selftest should already handle the missing capabilities
> just fine,

Supporting nway_reset is trivial, at least for drivers using
phylink/phylib. So we should encourage it.

So i would say if the device we are trying to test does not support
it, the test should fail. If the link peer does not have it, then i
would be more forgiving, we don't want a developer to be forced to
hack on somebody else driver in order to get their own driver to pass.

     Andrew
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads