On Wed, Sep 30, 2020 at 11:06:53PM +0300, Ido Schimmel wrote: > On Wed, Sep 30, 2020 at 10:59:17AM +0200, Michal Kubecek wrote: > > How about this compromise? Let's introduce a "legacy" flag which would > > allow "ethtool -s <dev> autoneg on" do what it used to do while we would > > not taint the kernel-userspace API with this special case so that > > ETHTOOL_MSG_LINKMODES_SET request with only ETHTOOL_A_LINKMODES_AUTONEG > > (but no other attributes like _SPEED or _DUPLEX) would leave advertised > > link modes untouched unless the "legacy" flag is set. If the "legacy" > > flag is set in the request, such request would set advertised modes to > > all supported. > > Sorry for the delay, busy with other obligations. Regarding the "legacy" > flag suggestion, do you mean that the ethtool user space utility will > always set it in ETHTOOL_MSG_LINKMODES_SET request in order to maintain > backward compatibility with the ioctl interface?
Yes, that is what I meant. We could also do the opposite (ioctl compatibility by default and a flag for the way it works now) but I would prefer the default (on userspace-kernel API level) to be "only ETHTOOL_A_LINKMODES_AUTONEG attribute means we only want to switch autonegotiation and touch nothing else". Michal