[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190206191054.GC14340@splinter>
Date: Wed, 6 Feb 2019 19:10:56 +0000
From: Ido Schimmel <idosch@...lanox.com>
To: Florian Fainelli <f.fainelli@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
open list <linux-kernel@...r.kernel.org>,
"open list:MELLANOX MLX5 core VPI driver"
<linux-rdma@...r.kernel.org>,
"open list:NETRONOME ETHERNET DRIVERS" <oss-drivers@...ronome.com>,
"open list:STAGING SUBSYSTEM" <devel@...verdev.osuosl.org>,
"moderated list:ETHERNET BRIDGE" <bridge@...ts.linux-foundation.org>
Subject: Re: [PATCH net-next v4 01/12] net: Introduce ndo_get_port_parent_id()
On Wed, Feb 06, 2019 at 09:45:35AM -0800, Florian Fainelli wrote:
> In preparation for getting rid of switchdev_ops, create a dedicated NDO
> operation for getting the port's parent identifier. There are
> essentially two classes of drivers that need to implement getting the
> port's parent ID which are VF/PF drivers with a built-in switch, and
> pure switchdev drivers such as mlxsw, ocelot, dsa etc.
>
> We introduce a helper function: dev_get_port_parent_id() which supports
> recursion into the lower devices to obtain the first port's parent ID.
>
> Convert the bridge, core and ipv4 multicast routing code to check for
> such ndo_get_port_parent_id() and call the helper function when valid
> before falling back to switchdev_port_attr_get(). This will allow us to
> convert all relevant drivers in one go instead of having to implement
> both switchdev_port_attr_get() and ndo_get_port_parent_id() operations,
> then get rid of switchdev_port_attr_get().
>
> Acked-by: Jiri Pirko <jiri@...lanox.com>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
Reviewed-by: Ido Schimmel <idosch@...lanox.com>
Powered by blists - more mailing lists