[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200718204401.237cie3gufldls2o@skbuf>
Date: Sat, 18 Jul 2020 23:44:01 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jiri Pirko <jiri@...lanox.com>,
Eric Dumazet <edumazet@...gle.com>,
Taehee Yoo <ap420073@...il.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Maxim Mikityanskiy <maximmi@...lanox.com>,
Richard Cochran <richardcochran@...il.com>,
Michal Kubecek <mkubecek@...e.cz>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 1/4] net: Wrap ndo_do_ioctl() to prepare for DSA
stacked ops
On Sat, Jul 18, 2020 at 01:36:25PM -0700, Florian Fainelli wrote:
>
>
> On 7/18/2020 1:30 PM, Vladimir Oltean wrote:
> > Hi Florian,
> >
> > On Fri, Jul 17, 2020 at 08:05:30PM -0700, Florian Fainelli wrote:
> >> In preparation for adding another layer of call into a DSA stacked ops
> >> singleton, wrap the ndo_do_ioctl() call into dev_do_ioctl().
> >>
> >> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> >> ---
> >
> > I missed most of the context, but this looks interesting. Am I correct
> > in saying that this could save us from having to manually pass
> > phy_mii_ioctl() and that it could be generically handled here?
>
> The motivation for this work started with the realization while
> untangling the ethtool/netlink and PHY library that tests like those:
> dev->netdev_ops == &foo_ops would be defeated by the way DSA overloads
> the DSA net_device operations. A better solution needed to be found.
>
> You are correct that we could just put a call to phy_mii_ioctl() here as
> well and avoid having drivers have to use phy_do_ioctl_running or roll
> their own.
> --
> Florian
I see.
The background for my question is that we came to realize that it would
be way cleaner if an Ethernet PHY with 1588 timestamping could just
overload .ndo_do_ioctl() and the ethtool .get_ts_info() of the host
network interface, very similarly to what DSA does.
So it's very good that you started this work, it looks like it provides
a very good foundation. Thanks!
-Vladimir
Powered by blists - more mailing lists