Subject: Re: [RFC PATCH net-next v2] ethtool: Improve compatibility between netlink and ioctl interfaces

From: Ido Schimmel <[email-masked]>
Date: Sun, 4 Oct 2020 16:37:57 +0300

On Sun, Oct 04, 2020 at 12:46:31PM +0000, David Laight wrote:
> From: Ido Schimmel
> > Sent: 04 October 2020 11:17
> > 
> > With the ioctl interface, when autoneg is enabled, but without
> > specifying speed, duplex or link modes, the advertised link modes are
> > set to the supported link modes by the ethtool user space utility.
> ...
> > Fix this incompatibility problem by introducing a new flag in the
> > ethtool netlink request header: 'ETHTOOL_FLAG_LEGACY'. The purpose of
> > the flag is to indicate to the kernel that it needs to be compatible
> > with the legacy ioctl interface. A patch to the ethtool user space
> > utility will make sure the flag is always set.
> 
> You need to do that the other way around.
> You can't assume the kernel and application are updated
> at the same time.

Thanks, David. In case ethtool is updated without updating the kernel we
will indeed get an error:

# ethtool -s eth0 autoneg on
netlink error: unrecognized request flags (offset 36)
netlink error: Operation not supported

Will wait for Michal's comments before doing another round.