Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Michal Kubecek
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 autoneg on" do what it used to do while we would > > not taint the kernel

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Ido Schimmel
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 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_

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Ido Schimmel
On Wed, Sep 30, 2020 at 05:35:31PM +0300, Ido Schimmel wrote: > https://github.com/torvalds/linux/blob/master/net/ethtool/linkmodes.c#L2 Should be: https://github.com/torvalds/linux/blob/master/net/ethtool/linkmodes.c#L290

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Ido Schimmel
On Wed, Sep 30, 2020 at 04:19:09PM +0200, Andrew Lunn wrote: > > > I don't think so. Doing: > > > > > > # ethtool -s eth0 autoneg > > > > > > Is a pretty established behavior to enable all the supported advertise > > > bits. > > I would disagree. phylib will return -EINVAL for this. This has no

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Andrew Lunn
> > I don't think so. Doing: > > > > # ethtool -s eth0 autoneg > > > > Is a pretty established behavior to enable all the supported advertise > > bits. I would disagree. phylib will return -EINVAL for this. int phy_ethtool_ksettings_set(struct phy_device *phydev, c

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Michal Kubecek
On Wed, Sep 30, 2020 at 10:25:29AM +0300, Ido Schimmel wrote: > On Tue, Sep 29, 2020 at 06:44:55PM +0200, Michal Kubecek wrote: > > On Tue, Sep 29, 2020 at 07:02:47PM +0300, Ido Schimmel wrote: > > > diff --git a/net/ethtool/linkmodes.c b/net/ethtool/linkmodes.c > > > index 7044a2853886..a9458c7620

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-30 Thread Ido Schimmel
On Tue, Sep 29, 2020 at 06:44:55PM +0200, Michal Kubecek wrote: > On Tue, Sep 29, 2020 at 07:02:47PM +0300, Ido Schimmel wrote: > > From: Ido Schimmel > > > > With the ioctl interface, when autoneg is enabled, but without > > specifying speed, duplex or link modes, the advertised link modes are >

Re: [RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-29 Thread Michal Kubecek
On Tue, Sep 29, 2020 at 07:02:47PM +0300, Ido Schimmel wrote: > From: Ido Schimmel > > 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. > [..

[RFC PATCH net] ethtool: Fix incompatibility between netlink and ioctl interfaces

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel 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. Example: # ethtool --version ethtool version 5.4 # ethtool -s swp3 speed 100