From: Andrew Lunn <andrew@lunn.ch>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: netdev-bot+sashiko@kernel.org, kuba@kernel.org,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
horms@kernel.org, linux@armlinux.org.uk, hkallweit1@gmail.com,
corbet@lwn.net, skhan@linuxfoundation.org,
o.rempel@pengutronix.de, vladimir.oltean@nxp.com,
f.fainelli@gmail.com, thomas.petazzoni@bootlin.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/3] selftests: drv-net: Introduce a selftest for ethtool flow control
Date: Tue, 13 Oct 2026 14:29:25 +0200 [thread overview]
Message-ID: <60fb2177-a08b-4c98-8242-3fa425c48d65@lunn.ch> (raw)
In-Reply-To: <f06aba7f-0e5f-4c9e-b53a-b5b817b3e6c6@bootlin.com>
> > [Severity: Medium]
> > The defer queue is LIFO (ksft_flush_defer() pops from the end), so at
> > teardown the link restore runs first. The pause restore follows right
> > after it, with no wait for autoneg to complete.
> >
> > Can the pause restore be refused in that window? i40e ties pause autoneg
> > to the link autoneg state:
> That's a i40e driver issue :) The tests aren't build around the HW behaviour.
Seems like the AI has not understood this is a test to find such
issues :-(
> > [Severity: Low]
> > This isn't a bug, but expect_pauseparams_set() also accepts EINVAL for
> > unsupported combinations:
> >
> > ksft_in(ret, (errno.EOPNOTSUPP, errno.EINVAL), note)
> >
> > phylink_ethtool_set_pauseparam() also returns -EINVAL for rx != tx when
> > Asym_Pause is not supported. Should the docstring mention EINVAL too?
>
> Docstrings are gonna be shrunk down as pylint says the file's too big... I'll
> update.
Please do consider the alternatives if the documentations is useful
for those trying to understand why a test has failed.
# pylint: disable=too-many-lines
> > Several drivers fail at least one of the four link autoneg / pause autoneg
> > combinations:
> >
> > bnxt_set_pauseparam() returns -EINVAL for pause autoneg without
> > BNXT_AUTONEG_SPEED, which is what the uAPI describes.
> >
> > mlx5e_ethtool_set_pauseparam() returns -EINVAL for any pause autoneg
> > request.
> >
> > ixgbe_set_pauseparam() returns -EINVAL when
> > !ixgbe_device_supports_autoneg_fc().
> >
> > i40e_set_pauseparam() returns -EOPNOTSUPP whenever pause->autoneg !=
> > is_an. That already fails the link autoneg on / pause autoneg off step.
>
> That's why we write those tests
:-)
I wounder if saying in the commit message that this test is to find
drivers who pause implementation is wrong will help get the AI into
the 'right mind' about what it is reviewing'.
> > [Severity: Medium]
> > What happens when set_local_pauseparams() fails with something other than
> > EOPNOTSUPP?
> >
> > The docstrings of set_local_pauseparams() and get_local_pauseparams() say
> > "Raise an error if the return is not 0 or EOPNOTSUPP". Neither function
> > raises. Both just return the result of ethtool_ret(), which uses
> > cmd(..., fail=False).
> >
> > Here, an EINVAL, an EBUSY, or ethtool's raw exit code 1 is silently dropped,
> > and ret is overwritten by wait_for_aneg(). The advertising checks then run
> > against whatever state was there before, because pause_setup() does not
> > put the pause params into a known state.
>
> Ok will address
EBUSY is an odd error code for these use cases. I would probably say
that is a test fail. It at least needs investigating why it happens.
Andrew
next prev parent reply other threads:[~2026-10-13 12:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 18:26 [PATCH net-next v2 0/3] selftests: drv-net: Introduce flow-control selftest Maxime Chevallier (Netdev Foundation)
2026-09-25 18:26 ` [PATCH net-next v2 1/3] selftests: drv-net: Introduce a selftest for ethtool flow control Maxime Chevallier (Netdev Foundation)
2026-09-29 3:26 ` netdev-bot+sashiko
2026-10-13 9:04 ` Maxime Chevallier
2026-10-13 12:29 ` Andrew Lunn [this message]
2026-09-25 18:26 ` [PATCH net-next v2 2/3] selftests: drv-net: pause: Validate the pause autonegotiation with a partner Maxime Chevallier (Netdev Foundation)
2026-09-29 3:26 ` netdev-bot+sashiko
2026-10-13 9:35 ` Maxime Chevallier
2026-10-13 12:37 ` Andrew Lunn
2026-10-13 14:02 ` Maxime Chevallier
2026-10-13 14:49 ` Andrew Lunn
2026-09-25 18:26 ` [PATCH net-next v2 3/3] selftests: drv-net: pause: Validate pause autoneg interactions with link autoneg Maxime Chevallier (Netdev Foundation)
2026-09-29 3:26 ` netdev-bot+sashiko
2026-09-30 23:07 ` [PATCH net-next v2 0/3] selftests: drv-net: Introduce flow-control selftest Jakub Kicinski
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=60fb2177-a08b-4c98-8242-3fa425c48d65@lunn.ch \
--to=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=skhan@linuxfoundation.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.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®