Article View: linux.kernel.netdev
Article #9006Re: [PATCH net] selftests: drv-net: pause: Skip support tests without link autonegotiation
From: Mohsin Bashir
Date: Fri, 30 Oct 2026 18:39
Date: Fri, 30 Oct 2026 18:39
71 lines
14308 bytes
14308 bytes
On 10/30/26 10:54 AM, Maxime Chevallier wrote:
> 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.
>
Right, it may be too restrictive however cleanup handling is still
required on both interfaces even when the DUT accepts the configuration
and runs its checks, the remote can reject the deferred restore and fail
the test. Ideally, this test should not depend on remote config in the
first place.
> Maybe the sane thing to do is to allows the defer() calls in pause_setup() to
> fail silently with "fail=False" ?
>
IMO using fail=False would also suppress genuine restoration errors when
settings actually changed and can leaving the interface in an unexpected
configuration. No?
> 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.
>
Yes, checking whether the DUT accepts ethtool -s is one options. We
could reuse the existing autonegotiated and forced-link attempts, and
report SKIP if neither allows pause checks to run. Alternatively, we can
add a remote arg to require_link_autoneg(), default to True, and pass
False for this test so it checks only the DUT’s autonegotiation support.
Technical Details
Message-ID:
<7cd99851-5bc0-4db8-a44c-a664c3f824b1@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353889-linux-kernel-netdev=dewy.ruReferences:
<20261030173516.1002250-1-mohsin.bashr@gmail.com> <701c6f7e-e715-4647-bddf-48a1485afbe2@bootlin.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353889-linux-kernel-netdev=dewy.ru
From: mohsin.bashr@gmail.com (Mohsin Bashir)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] selftests: drv-net: pause: Skip support tests without
link autonegotiation
Date: Fri, 30 Oct 2026 11:39:05 -0700
Organization: Usenet Network
Message-ID: <7cd99851-5bc0-4db8-a44c-a664c3f824b1@gmail.com>
References: <20261030173516.1002250-1-mohsin.bashr@gmail.com>
<701c6f7e-e715-4647-bddf-48a1485afbe2@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2295342"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/2jy04bEIo5nhnUTncFUfgIKvUo= sha256:1+1g8JXi9o2Waz41CPyTVD/QcMRyyMXV11HbyGBoD8o=
sha1:w9p0XAZnQskPGUdvBTMjp7iPXxo= sha256:vCpBvfPuQT6ACqa4fHQYYjpg66Bm6GbcytKa1WoF+vg=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 30A71125CA5; Fri, 30 Oct 2026 21:40:42 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.047
X-Spam-Status: No, score=-3.047 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id vfEswpde_nrO;
Fri, 30 Oct 2026 21:40:38 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353889-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 75D31125CA3; Fri, 30 Oct 2026 21:40:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 35AEA26A7A; Fri, 30 Oct 2026 18:39:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793385549;
b=xGw0XlNCsZACBXHwDucBYzxm/fT15/6IHzAc01MMDrrmuIRYzR3OwXE5LvZbQXZ9JZuk
GHOk/uUlx9Oe8BXXCSL7WL9GPTQMZIGGHSmsJqusHz/0nspmZ8OVhSXPw4cfPjn0gZNQ8
LRsRFEasCdMbWm+vFNtRbjw01juF4+BYRqnOCymFXBR98cr2jcVF9k6/Cb5qqwCYX/UsE
eyAo0FCkLDcXIMxYFkSWnab9kPxe8PVCKcPLcf8HDbyVN265QQH0iMrKzOM5hi5paKGUt
2madThoPcpzfxMp+TAzvpxpwaBMR/zQ26El1je+HbhoGXkdNtx4bl+crVM1rlPvUpCA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793385549;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Message-ID:Date:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:User-Agent:Subject:To:Cc:References:
Content-Language:From:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=cM+BvkDxP8fM78hQZg5AYrn5YUAQx7WN9vYLoZ70OUo=;
b=WzVNcZBjfTcVdk65kN9x+coGMEWICE5ySsaZsSiHmaUPRxc37ad6ibZZ7A0SL8IxAN6r
PPFkRXGOLB0AFFrgcGJmXh3WoFw8DjkK1M4p1iMcctobvU9ieaqdWExCfWD0N29mPPafI
kOJON65uufDK1kZI6Qy6UJyuf0j5peLh31N9E14NgOpeMuPlJO+yh2cxA3oK0eoIs4Pt8
PNEpwgFciz5Vn/6tgi/ROJGOordrqQ4Qjc/s8EloT6KmcFl0Li7xJqNnmwz4sFPr/lLcp
maermo/FESPQ1azHYEyq5C7US+yyR0DSUJ/pUiQFs6S48+CWJ1XbNoKSaGBsdXkeUNw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=t0jDxw+g;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A867C606A32E;
Fri, 30 Oct 2026 18:39:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=t0jDxw+g
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793385548;
b=polx9M7ee/N0d4pft0BgOeqdju0ExxD1VovT8vO96KdpVfocH5Za6sdy5uJdfGyTSd08
Wfvd09oZSXdI9AboroP2ZrHSTjTCIR5FlVznuyyP3VB92Vvn/hOnJd8/naWKMQZMUk4mj
N5wc6kT1E7ZTxJ4W8pxuAy+4vBV0Tx28VUyLQwPy7BbFeB+XNd/DDN5QTRogl91f6aCET
3NaHMFlRFthVlC0689ShEVVoRSGZhKjWUJ1nUWG7bMFs41aec+aa/AWbqSKskvmXFoPtE
wcHU73imc2ENuXFW8Be18iMXOTElu+5xzNk8W6BdZAFmcC1FSb8RcwJduzaeZpxqZnw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793385548;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:
Content-Language:From:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=cM+BvkDxP8fM78hQZg5AYrn5YUAQx7WN9vYLoZ70OUo=;
b=1ZPFcoJPq22ZjJRVm/MxNRqNLMkJe1d3FZKWhJywTN055F2+J/XbvKlh6uQjMIyB7ZmC
vNxbSNWSeWztgjP34GbhImNWibMm23bQl9f5YIu4sPz3ZWJ7GIwuhAyMRxCABgfF6Gyzt
9lO11K3UpDzfTv1koYRaTI4N9hWi+iDKR7RxxFQjGfgwca5V/IUvVXT64cRipqSm5A5ZH
OjgglEeiZWx6KcRvc8QjZWZ9eVyH7jdTOnObzQnZ4WVvDpEo+bJ1ruPNXOiXY8TQjET5A
n0HSqWFDWv/0EoCkNfmBLaRLEMtANpAkr581QVhKVnFXynrMhHJ15gS2SgkhDk0n27g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=t0jDxw+g;
arc=none smtp.remote-ip=74.125.82.45
X-Received: from mail-dl1-f45.google.com (mail-dl1-f45.google.com [74.125.82.45])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 794BF606A31F
for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 18:39:08 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 794BF606A31F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dl1-f45.google.com with SMTP id a92af1059eb24-1a3c08d6928so1338461c88.0
for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 11:39:08 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793385547; x=1793990347; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=cM+BvkDxP8fM78hQZg5AYrn5YUAQx7WN9vYLoZ70OUo=;
b=t0jDxw+gwG9FlkDiEEVKvJaGAMnA0fNNcq4vgNLzqnEQ0wgefhM8hHDjvJHbU4urig
ZK/LbzZbDDXFxa5we+5dvRUq34ibd/Er8cHs3w5LD2Cc6ZnLoMubT9It4w7KF20N5xY4
itU//CqLRqBco9eTk66evHlYiF0s7qxOhR8cm1Js5PMWBoAT6KS6LYbAl1EKBW2is0IB
1hvxsNSEXCXS+Cf5IZsGZWIoongcTVYTGGsIJ+KrgT8eDM+Ylb29+k0yvtbpGPAGwrAl
SDQVoEbP+vAn4gtgCUB0JeUzIR99YqVXZTy+YbU0AQ8TI2VqBAgGqI1Cof9PYQGgOwLA
D4Xg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793385547; x=1793990347;
h=content-transfer-encoding:content-type:in-reply-to:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=cM+BvkDxP8fM78hQZg5AYrn5YUAQx7WN9vYLoZ70OUo=;
b=pUcUoPQfAiiOEPp2bKOPIQzNiE03exFK1jXmYcGbLI1H2HJ8G71L+x7C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WnZQyf/W4rEbkTs6ecbHSS2l6NbdcVl5qvbw+SBeKOaHF1XqwTrVKPlmWB2ewCa2
ksU8fIiWmQ5XCABY22EiFE4FeirnU7GP2gYBr6JK/n/B9F6nxKYgF5dEMRbFYRQHMr+shG2ofdl
1
X-Received: by 2002:a05:701b:4213:10b0:1a4:fac9:aeee with SMTP id a92af1059eb24-1ac56d95c0amr4153882c88.4.1793385547176;
Fri, 30 Oct 2026 11:39:07 -0700 (PDT)
X-Received: from ?IPV6:2a03:83e0:1151:15:c56:221b:35d5:85f? ([2620:10d:c090:500::4:2e7d])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac194b5437sm9886300c88.13.2026.10.30.11.39.06
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Fri, 30 Oct 2026 11:39:06 -0700 (PDT)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-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
X-In-Reply-To: <701c6f7e-e715-4647-bddf-48a1485afbe2@bootlin.com>