Netdev List
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Mohsin Bashir <mohsin.bashr@gmail.com>, netdev@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org
Subject: Re: [PATCH net] selftests: drv-net: pause: Skip support tests without link autonegotiation
Date: Fri, 30 Oct 2026 18:54:32 +0100	[thread overview]
Message-ID: <701c6f7e-e715-4647-bddf-48a1485afbe2@bootlin.com> (raw)
In-Reply-To: <20261030173516.1002250-1-mohsin.bashr@gmail.com>

Hi,

On 10/30/26 18:35, Mohsin Bashir wrote:
> From: Mohsin Bashir <hmohsin@meta.com>
> 
> Devices without link autonegotiation support may reject both link-setting
> requests in pause_test_support(). On fbnic, all four variants then fail
> in cleanup when the deferred restore of unchanged link settings returns
> EOPNOTSUPP. Removing the restore alone would report PASS without running
> any pause checks.
> 
> Fix this by calling require_link_autoneg() before pause_setup() to skip
> the test when either interface lacks link autonegotiation support. This
> also skips devices that support only forced link configuration.
> 
> The issue was observed in the fbnic CI/CD pipeline. It was reproduced and
> the fix was tested on a local fbnic device.
> 
> Fixes: cbd8a536cd6d ("selftests: drv-net: Introduce a selftest for ethtool flow control")
> Signed-off-by: Mohsin Bashir <hmohsin@meta.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  tools/testing/selftests/drivers/net/hw/pause.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/drivers/net/hw/pause.py b/tools/testing/selftests/drivers/net/hw/pause.py
> index ca4a55e59c30..1537f88e0e77 100755
> --- a/tools/testing/selftests/drivers/net/hw/pause.py
> +++ b/tools/testing/selftests/drivers/net/hw/pause.py
> @@ -466,6 +466,7 @@ def pause_test_support(cfg, pauseparams):
>      supported fields.
>      """
>  
> +    require_link_autoneg(cfg)

This helper checks if the remote supports aneg too, so it's too restrictive.

The goal of this test is to check the local device's behaviour, without too
much dependencies on the remote, so that we can at least have it test some of
the local driver behaviour even when it's connected to a dumb remote or a switch.

Maybe the sane thing to do is to allows the defer() calls in pause_setup() to
fail silently with "fail=False" ?

Or maybe a bit more clever, have a quick check to see if the device accepts
an ethtool -s XXX command ? looks like fbnic will refuse all of'em as it
doesn't have a .set_link_ksettings.

Maxime


      reply	other threads:[~2026-10-30 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 17:35 [PATCH net] selftests: drv-net: pause: Skip support tests without link autonegotiation Mohsin Bashir
2026-10-30 17:54 ` Maxime Chevallier [this message]

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=701c6f7e-e715-4647-bddf-48a1485afbe2@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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