Re: [PATCH net-next v2 2/3] selftests: drv-net: pause: Validate the pause autonegotiation with a partner

From: Andrew Lunn

Date: Tue Oct 13 2026 - 11:39:35 EST


On Tue, Oct 13, 2026 at 04:02:44PM +0200, Maxime Chevallier wrote:
>
>
> On 10/13/26 14:37, Andrew Lunn wrote:
> >>> Firmware-managed NICs such as ice also keep the link on close by default.
> >>> In drivers/net/ethernet/intel/ice/ice_main.c, the PHY is only taken down
> >>> on close when ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA is set:
> >>>
> >>> if (test_bit(ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA, vsi->back->flags)) {
> >>> int link_err = ice_phy_cfg(vsi, false);
> >>>
> >>> On this kind of hardware, a directly connected peer would be cached as
> >>> cfg.lp_controllable = False. pause_aneg_resolution(), and the four later
> >>> tests in the series, would then skip with "is not directly connected".
> >>> That message points at cabling, when the real cause is that the PHY
> >>> stayed powered.
> >>>
> >>> The new remote lp_advertising checks in pause_advertising_test() would
> >>> also be skipped without any notice.
> >>
> >> Not much we can do if the peer doesn't behave as expected here. Not sure this
> >> requires attention.
> >
> > I sounds like anything with a BMC is going to hit this. So i doubt you
> > will see it with your stmmac boards. Maybe sometime in the future we
> > can query the NIC to see if it supports NCSI and change the test
> > behaviour to fit?
>
> Maybe the strategy is wrong then, the goal is to check that we're directly
> connected to our test peer through a cable, or indirectly through a switch.
>
> Link flapping seemed to me like the most generic solution, but maybe we can
> do something entirely different ? Like for example trigger a re-negotiation
> with ethtool -r and check for link flap, or maybe more reliably, ask the user
> to pass a flag to the selftest command saying if yes or no we're directly
> connected ?

Triggering a renegotiation is probably the best. I've no experience
with BMCs, but i suspect a down will not work, because it cuts the BMC
off from the network. A renegotiation does seem like a safer choice.

Andrew