From: Jiri Pirko <jiri@resnulli.us>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com,
idosch@mellanox.com, jakub.kicinski@netronome.com,
andrew@lunn.ch, vivien.didelot@gmail.com,
michael.chan@broadcom.com
Subject: Re: [patch net-next v2 08/12] dsa: implement ndo_get_devlink_port
Date: Thu, 28 Mar 2019 00:46:54 +0100 [thread overview]
Message-ID: <20190327234654.GI14297@nanopsycho> (raw)
In-Reply-To: <b027a7eb-179b-fbd8-7641-2468fe1cc483@gmail.com>
Wed, Mar 27, 2019 at 09:13:00PM CET, f.fainelli@gmail.com wrote:
>On 3/27/19 1:01 PM, Jiri Pirko wrote:
>> Wed, Mar 27, 2019 at 08:54:41PM CET, f.fainelli@gmail.com wrote:
>>> On 3/26/2019 5:03 AM, Jiri Pirko wrote:
>>>> From: Jiri Pirko <jiri@mellanox.com>
>>>>
>>>> In order for devlink compat functions to work, implement
>>>> ndo_get_devlink_port. Legacy slaves does not have devlink port instances
>>>> created for themselves.
>>>
>>> Not a big fan of de-duplicating the entire set of netdev_ops for legacy
>>> vs. non-legacy, can we just check that the devlink instance was r
>>
>> In nfp, I make legacy and non-legacy ndos to be shared. However there,
>> they are doing to eventually all use devlink ports. In dsa on the other
>> hand, I don't think that legacy is going to use devlink port, would it?
>
>The legacy probing method has not been updated to match what
>net/dsa/dsa2.c does, but there is no technical reason for not supporting
>devlink instances over ports registered through the legacy interface. So
>eventually all of what you did here will be thrown away (not sure by
>which timeframe, probably after mv88e6060 finally gets converted to the
>new binding).
Okay. In that case, when you say legacy will be eventually remove,
Will do the same as I did for nfp. Thanks!
>
>> I wan't to eventually have WARN_ON in devlink code in case devlink_port
>> exists and phys_port_name ndo is present at the same time.
>>
>
>No sure, but you could always do something like:
>
>if (!dp->devlink_registered)
> return dsa_slave_get_phys_port_name();
>
>return &dp->devlink_port;
>
>is what I had in mind. This just requires adding a boolean to track the
>registration of devlink ports within net/dsa/dsa2.c which should be
>fewer lines of code and easier to remove in the future. No strong
>objections though.
>--
>Florian
next prev parent reply other threads:[~2019-03-27 23:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 12:02 [patch net-next v2 00/12] net: call for phys_port_name into devlink directly if possible Jiri Pirko
2019-03-26 12:02 ` [patch net-next v2 01/12] net: replace ndo_get_devlink with ndo_get_devlink_port Jiri Pirko
2019-03-26 20:27 ` Jakub Kicinski
2019-03-27 7:47 ` Jiri Pirko
2019-03-26 12:02 ` [patch net-next v2 02/12] net: devlink: introduce devlink_compat_phys_port_name_get() Jiri Pirko
2019-03-26 20:30 ` Jakub Kicinski
2019-03-26 12:02 ` [patch net-next v2 03/12] mlxsw: Implement ndo_get_devlink_port Jiri Pirko
2019-03-26 12:02 ` [patch net-next v2 04/12] mlxsw: Remove ndo_get_phys_port_name implementation Jiri Pirko
2019-03-26 12:03 ` [patch net-next v2 05/12] net: devlink: remove unused devlink_port_get_phys_port_name() function Jiri Pirko
2019-03-26 20:31 ` Jakub Kicinski
2019-03-26 12:03 ` [patch net-next v2 06/12] bnxt: implement ndo_get_devlink_port Jiri Pirko
2019-03-26 12:03 ` [patch net-next v2 07/12] bnxt: remove ndo_get_phys_port_name implementation Jiri Pirko
2019-03-26 12:03 ` [patch net-next v2 08/12] dsa: implement ndo_get_devlink_port Jiri Pirko
2019-03-27 19:54 ` Florian Fainelli
2019-03-27 20:01 ` Jiri Pirko
2019-03-27 20:13 ` Florian Fainelli
2019-03-27 23:46 ` Jiri Pirko [this message]
2019-03-26 12:03 ` [patch net-next v2 09/12] dsa: don't fill-up remove ndo_get_phys_port_name for slaves Jiri Pirko
2019-03-26 12:03 ` [patch net-next v2 10/12] nfp: do not handle nn->port defined case in nfp_net_get_phys_port_name() Jiri Pirko
2019-03-26 20:31 ` Jakub Kicinski
2019-03-26 12:03 ` [patch net-next v2 11/12] net: devlink: expose phys port name Jiri Pirko
2019-03-26 20:35 ` Jakub Kicinski
2019-03-27 7:45 ` Jiri Pirko
2019-03-27 11:56 ` Jiri Pirko
2019-03-26 12:03 ` [patch net-next v2 12/12] net: devlink: add warning for ndo_get_phys_port_name set when not needed Jiri Pirko
2019-03-26 20:36 ` Jakub Kicinski
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=20190327234654.GI14297@nanopsycho \
--to=jiri@resnulli.us \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=idosch@mellanox.com \
--cc=jakub.kicinski@netronome.com \
--cc=michael.chan@broadcom.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@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).