From: Vladimir Oltean <olteanv@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@mellanox.com>,
Eric Dumazet <edumazet@google.com>,
Taehee Yoo <ap420073@gmail.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Maxim Mikityanskiy <maximmi@mellanox.com>,
Richard Cochran <richardcochran@gmail.com>,
Michal Kubecek <mkubecek@suse.cz>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/4] net: Wrap ndo_do_ioctl() to prepare for DSA stacked ops
Date: Sat, 18 Jul 2020 23:44:01 +0300 [thread overview]
Message-ID: <20200718204401.237cie3gufldls2o@skbuf> (raw)
In-Reply-To: <a8b08bf9-2f45-8816-4056-2da42d4d9e24@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2020-07-18 20:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-18 3:05 [PATCH net-next 0/4] net: dsa: Setup dsa_netdev_ops Florian Fainelli
2020-07-18 3:05 ` [PATCH net-next 1/4] net: Wrap ndo_do_ioctl() to prepare for DSA stacked ops Florian Fainelli
2020-07-18 20:30 ` Vladimir Oltean
2020-07-18 20:36 ` Florian Fainelli
2020-07-18 20:44 ` Vladimir Oltean [this message]
2020-07-19 15:31 ` Andrew Lunn
2020-07-18 3:05 ` [PATCH net-next 2/4] net: dsa: Add wrappers for overloaded ndo_ops Florian Fainelli
2020-07-19 15:40 ` Andrew Lunn
2020-07-19 16:10 ` Florian Fainelli
2020-07-18 3:05 ` [PATCH net-next 3/4] net: Call into DSA netdevice_ops wrappers Florian Fainelli
2020-07-18 21:18 ` Vladimir Oltean
2020-07-18 21:53 ` Florian Fainelli
2020-07-19 16:04 ` Andrew Lunn
2020-07-19 16:08 ` Florian Fainelli
2020-07-18 3:05 ` [PATCH net-next 4/4] net: dsa: Setup dsa_netdev_ops Florian Fainelli
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=20200718204401.237cie3gufldls2o@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximmi@mellanox.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=vivien.didelot@gmail.com \
--cc=xiyou.wangcong@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