[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220401134059.zef4ltvnux66jl2y@soft-dev3-1.localhost>
Date: Fri, 1 Apr 2022 15:40:59 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
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
The 04/01/2022 14:36, Andrew Lunn wrote:
>
> 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.
Yes, I can see your point, the proposed solution is not scalable.
I will try implement something like you suggested.
>
> Andrew
--
/Horatiu
Powered by blists - more mailing lists