> I see. Yeah for speed we need to do something more than use the hard-coded > values because it varies depending on whether we have lane bonding (not the > same bonding you are doing) enabled and also how the link trained.
FYI: In theory, you don't need to keep to the speeds defined in the ethtool header: https://elixir.bootlin.com/linux/v6.17.9/source/include/uapi/linux/ethtool.h#L2177 However, ethtool might report a warning it does not know how to convert to a nice looking number. So if you only have a small number of possible speeds, please consider extending the list in ethtool, and phy_speed_to_str(). > > +{ > > + /* ThunderboltIP is a software-only full-duplex network tunnel. > > + * We report fixed link settings to satisfy bonding (802.3ad) > > + * requirements for LACP port key calculation. Speed is set to > > + * 10Gbps as a conservative baseline. > > + */ > > + ethtool_link_ksettings_zero_link_mode(cmd, supported); > > + ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseT_Full); > > + > > + ethtool_link_ksettings_zero_link_mode(cmd, advertising); > > + ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseT_Full); Are link modes needed by bonding? You technically don't have a baseT link, its not four twisted pairs, RJ45 connectors etc. Also, since you set autoneg to disabled, you are not advertising anything. If the bond drive does not care, i would leave supported and advertising empty. Andrew

