Page MenuHomeVyOS Platform

"could not change "ethX" flow control setting!"
Open, LowPublic

Description

On my Intel C3000 system with an integrated X553 SFP+ NIC, I regularly get the following warning when modifying interface settings:

WARNING could not change "eth6" flow control setting!

I concluded this is because my SFP+ interface does not support autonegation:

$ ethtool -A eth6 autoneg on rx on tx on
netlink error: Invalid argument

VyOS always tries to set all three parameters in concert, regardless of whether the NIC supports them: https://github.com/vyos/vyos-1x/blob/current/python/vyos/ifconfig/ethernet.py#L162

Attempting to set disable-flow-control does quiet the warning, but it doesn't actually turn off flow control:

[edit interfaces ethernet eth6]
lucas@lcn-router# set disable-flow-control
[edit interfaces ethernet eth6]
lucas@lcn-router# commit
[edit interfaces ethernet eth6]
lucas@lcn-router# ethtool -a eth6
Pause parameters for eth6:
Autonegotiate:	off
RX:		on
TX:		on

This appears to be because ethtool.py only looks at the autonegotiate setting to determine whether flow-control is currently enabled: https://github.com/vyos/vyos-1x/blob/current/python/vyos/ethtool.py#L204

One obvious answer might be to improve the flow-control syntax to allow controlling the "autoneg" setting and "tx"/"rx" independently. Unfortunately, it turns out the kernel interface is vague and inconsistent about how these settings interplay, which had led to a minefield of varying driver implementations: https://lore.kernel.org/netdev/[email protected]/T/

As such, it may be best to leave that mess untouched and patch our boolean enable/disable implementation to behave as follows:

  • If the interface supports auto-negotiation, presumably it supports pause frame auto-negotiation. By default use "autoneg on tx on rx on" (seems to be interpreted by most NIC drivers as "advertise support for symmetric pause frames, but only use them if the other side also negotiates them"). If disable-flow-control is set, use autoneg off tx off rx off.
  • If the interface does not support auto-negotiation, use tx on rx on (always send pause frames). If disable-flow-control is set, use tx off rx off.

This should only produce a behavior change for users with the last case that have disable-flow-control set, who currently may actually have flow control enabled without realizing it.

Details

Difficulty level
Unknown (require assessment)
Version
1.5-rolling-202408180807
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)

Event Timeline

lucasec created this object in space S1 VyOS Public.