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: <YkbxtzE/BRfz0XTW@lunn.ch>
Date:   Fri, 1 Apr 2022 14:36:07 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
        kuba@...nel.org, richardcochran@...il.com,
        UNGLinuxDriver@...rochip.com
Subject: Re: [RFC PATCH net-next 1/2] ethtool: Extend to allow to set PHY
 latencies

On Fri, Apr 01, 2022 at 11:39:08AM +0200, Horatiu Vultur wrote:
> Extend ethtool uapi to allow to configure the latencies for the PHY.
> Allow to configure the latency per speed and per direction.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> ---
>  include/uapi/linux/ethtool.h |  6 ++++++
>  net/ethtool/common.c         |  6 ++++++
>  net/ethtool/ioctl.c          | 10 ++++++++++
>  3 files changed, 22 insertions(+)
> 
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index 7bc4b8def12c..f120904a4e43 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -296,6 +296,12 @@ enum phy_tunable_id {
>  	ETHTOOL_PHY_DOWNSHIFT,
>  	ETHTOOL_PHY_FAST_LINK_DOWN,
>  	ETHTOOL_PHY_EDPD,
> +	ETHTOOL_PHY_LATENCY_RX_10MBIT,
> +	ETHTOOL_PHY_LATENCY_TX_10MBIT,
> +	ETHTOOL_PHY_LATENCY_RX_100MBIT,
> +	ETHTOOL_PHY_LATENCY_TX_100MBIT,
> +	ETHTOOL_PHY_LATENCY_RX_1000MBIT,
> +	ETHTOOL_PHY_LATENCY_TX_1000MBIT,

How does this scale with 2.5G, 5G, 10G, 14G, 40G, etc.

Could half duplex differ to full duplex? What about 1000BaseT vs
1000BaseT1 and 1000BaseT2? The Aquantia/Marvell PHY can do both
1000BaseT and 1000BaseT2 and will downshift from 4 pairs to 2 pairs if
you have the correct magic in its firmware blobs.

A more generic API would pass a link mode, a direction and a
latency. The driver can then return -EOPNOTSUPP for a mode it does not
support.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ