lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 24 Jan 2021 08:36:26 +0000
From:   Danielle Ratson <danieller@...dia.com>
To:     Edwin Peer <edwin.peer@...adcom.com>
CC:     netdev <netdev@...r.kernel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Jiri Pirko <jiri@...dia.com>,
        Andrew Lunn <andrew@...n.ch>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "Michal Kubecek" <mkubecek@...e.cz>, mlxsw <mlxsw@...dia.com>,
        Ido Schimmel <idosch@...dia.com>
Subject: RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of
 speed and duplex parameters



> -----Original Message-----
> From: Edwin Peer <edwin.peer@...adcom.com>
> Sent: Thursday, January 21, 2021 1:39 AM
> To: Danielle Ratson <danieller@...dia.com>
> Cc: netdev <netdev@...r.kernel.org>; David S . Miller <davem@...emloft.net>; Jakub Kicinski <kuba@...nel.org>; Jiri Pirko
> <jiri@...dia.com>; Andrew Lunn <andrew@...n.ch>; f.fainelli@...il.com; Michal Kubecek <mkubecek@...e.cz>; mlxsw
> <mlxsw@...dia.com>; Ido Schimmel <idosch@...dia.com>
> Subject: Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters
> 
> On Wed, Jan 20, 2021 at 3:21 AM Danielle Ratson <danieller@...dia.com> wrote:
> 
> > +       link_ksettings->link_mode = -1;
> > +       err = dev->ethtool_ops->get_link_ksettings(dev, link_ksettings);
> > +       if (err)
> > +               return err;
> > +
> > +       if (link_ksettings->link_mode != -1) {
> > +               link_info = &link_mode_params[link_ksettings->link_mode];
> > +               link_ksettings->base.speed = link_info->speed;
> > +               link_ksettings->lanes = link_info->lanes;
> > +               link_ksettings->base.duplex = link_info->duplex;
> > +       }
> 
> Why isn't this also handled using a capability bit as is done for
> lanes? Is link_mode read-only? Should it / will it always be? If not,
> can drivers also derive the other fields if asked to set link_mode?

The link_mode param is only for deriving all the speed, lanes and duplex params in ethtool instead of deriving in driver and then passing each individual, as Michal asked.

> That would be easy enough. Why don't we simply allow user space to set
> link mode directly too (in addition to being able to constrain lanes
> for autoneg or forced speeds)?

It is already possible to do using 'advertise' parameter. 

> 
> Regards,
> Edwin Peer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ