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]
Message-ID: <20191219131156.21332555@hermes.lan>
Date:   Thu, 19 Dec 2019 13:11:56 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Cris Forno <cforno12@...ux.vnet.ibm.com>
Cc:     netdev@...r.kernel.org, mst@...hat.com, jasowang@...hat.com,
        haiyangz@...rosoft.com, sthemmin@...rosoft.com, sashal@...nel.org,
        tlfalcon@...ux.ibm.com
Subject: Re: [PATCH, net-next, v3, 0/2] net/ethtool: Introduce
 link_ksettings API for virtual network devices

On Thu, 19 Dec 2019 13:40:55 -0600
Cris Forno <cforno12@...ux.vnet.ibm.com> wrote:

> This series provides an API for drivers of virtual network devices that allows
> users to alter initial device speed and duplex settings to reflect the actual
> capabilities of underlying hardware. The changes made include two helper
> functions ethtool_virtdev_get/set_link_ksettings, which are used to retrieve or
> update alterable link settings, respectively. In addition, there is a new
> ethtool operation defined to validate those settings provided by the user. This
> operation can use either a generic validation function,
> ethtool_virtdev_validate_cmd, or one defined by the driver. These changes
> resolve code duplication for existing virtual network drivers that have already
> implemented this behavior.  In the case of the ibmveth driver, this API is used
> to provide this capability for the first time.
> 
> ---
> v3: Factored out duplicated code to core/ethtool to provide API to virtual
>     drivers
>     
> v2: Updated default driver speed/duplex settings to avoid breaking existing
>     setups
> ---
> 
> Cris Forno (2):
>   Three virtual devices (ibmveth, virtio_net, and netvsc) all have
>     similar code to set/get link settings and validate ethtool command.
>     To     eliminate duplication of code, it is factored out into
>     core/ethtool.c.
>   With get/set link settings functions in core/ethtool.c, ibmveth,
>     netvsc, and virtio now use the core's helper function.
> 
>  drivers/net/ethernet/ibm/ibmveth.c | 60 +++++++++++++++++++++-----------------
>  drivers/net/ethernet/ibm/ibmveth.h |  3 ++
>  drivers/net/hyperv/netvsc_drv.c    | 21 ++++---------
>  drivers/net/virtio_net.c           | 45 ++++------------------------
>  include/linux/ethtool.h            |  2 ++
>  net/core/ethtool.c                 | 56 +++++++++++++++++++++++++++++++++++
>  6 files changed, 104 insertions(+), 83 deletions(-)
> 
> --
> 1.8.3.1

I don't think this makes sense for netvsc. The speed and duplex have no
meaning, why do you want to allow overriding it? If this is to try and make
some dashboard look good; then you aren't seeing the real speed which is
what only the host knows. Plus it does take into account the accelerated
networking path.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ