From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
<davem@davemloft.net>, <kuba@kernel.org>,
<richardcochran@gmail.com>, <UNGLinuxDriver@microchip.com>
Subject: Re: [RFC PATCH net-next 1/2] ethtool: Extend to allow to set PHY latencies
Date: Fri, 1 Apr 2022 15:40:59 +0200 [thread overview]
Message-ID: <20220401134059.zef4ltvnux66jl2y@soft-dev3-1.localhost> (raw)
In-Reply-To: <YkbxtzE/BRfz0XTW@lunn.ch>
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@microchip.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
next prev parent reply other threads:[~2022-04-01 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 9:39 [RFC PATCH net-next 0/2] ethtool: Extend to set PHY latencies Horatiu Vultur
2022-04-01 9:39 ` [RFC PATCH net-next 1/2] ethtool: Extend to allow " Horatiu Vultur
2022-04-01 12:36 ` Andrew Lunn
2022-04-01 13:40 ` Horatiu Vultur [this message]
2022-04-01 9:39 ` [RFC PATCH net-next 2/2] net: phy: micrel: Implement set/get_tunable Horatiu Vultur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220401134059.zef4ltvnux66jl2y@soft-dev3-1.localhost \
--to=horatiu.vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).