Re: [PATCH net v2] selftests: drv-net: pause: Avoid cleanup failures for unsupported link settings

From: Mohsin Bashir

Date: Wed Nov 04 2026 - 15:37:38 EST




On 11/4/26 2:57 AM, Maxime Chevallier wrote:
Hi,

On 11/3/26 20:06, Mohsin Bashir wrote:
From: Mohsin Bashir <hmohsin@xxxxxxxx>

pause_setup() saves the initial link settings and queues a deferred
restore. For devices that report forced link settings but do not support
changing link settings, this can queue a restore even when setup never
changes the link. On fbnic, the deferred restore returns EOPNOTSUPP and
turns pause tests that use pause_setup() into cleanup failures.

Fix this by queuing the forced-link restore only after setup successfully
enables link autonegotiation. Keep pause_test_support coverage for devices
that cannot change link settings by falling back to forced MAC pause on the
current link. Run the extra link autoneg on/off checks only when those link
setting requests are accepted.

Results on fbnic:

Before: # Totals: pass:0 fail:4 xfail:0 xpass:0 skip:24 error:0
After: # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:24 error:0

Fixes: cbd8a536cd6d ("selftests: drv-net: Introduce a selftest for ethtool flow control")
Signed-off-by: Mohsin Bashir <hmohsin@xxxxxxxx>

That looks better, this patch ran on the netdev CI and no regressions on
stmmac,

Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>

Maxime


Hi Maxime,

Thanks for the feedback on V1 and review of V2.