mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
	davem@davemloft.net, Eric Dumazet <edumazet@kernel.org>,
	Willem de Bruijn <willemb@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Bobby Eshleman <bobbyeshleman@meta.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Breno Leitao <leitao@debian.org>,
	thomas.petazzoni@bootlin.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net] selftests: drv-net: pause: detect the link partner from the remote side
Date: Tue, 24 Nov 2026 15:28:22 +0100	[thread overview]
Message-ID: <fb92bc0b-ab3f-49ac-b4a5-5368c87b3a7e@bootlin.com> (raw)
In-Reply-To: <4148e81b-ec5b-4374-b74f-4f5cba175c7b@kernel.org>



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 :(

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 for the report !

Maxime

> pw-bot: cr
> 
> Cheers,
> Matt


  reply	other threads:[~2026-11-24 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 20:14 Maxime Chevallier (Netdev Foundation)
2026-11-24 11:29 ` Matthieu Baerts
2026-11-24 14:28   ` Maxime Chevallier [this message]
2026-11-24 16:15     ` Matthieu Baerts
2026-11-24 16:26       ` Maxime Chevallier

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=fb92bc0b-ab3f-49ac-b4a5-5368c87b3a7e@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=skhan@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=willemb@google.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

all inboxes | Powered by JetHome®