[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90c0b9d3-6d54-c4f1-407f-0f93c12caf5d@cumulusnetworks.com>
Date: Fri, 1 Jul 2016 10:16:23 -0600
From: David Ahern <dsa@...ulusnetworks.com>
To: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc: davem@...emloft.net, idosch@...lanox.com, yotamg@...lanox.com,
eladr@...lanox.com, nogahf@...lanox.com, ogerlitz@...lanox.com,
sfeldma@...il.com, roopa@...ulusnetworks.com, andy@...yhouse.net,
tgraf@...g.ch, jhs@...atatu.com, linville@...driver.com,
ivecera@...hat.com
Subject: Re: [patch net-next 11/42] mlxsw: spectrum: Add router interface
struct
On 7/1/16 8:04 AM, Jiri Pirko wrote:
> @@ -327,6 +333,19 @@ mlxsw_sp_port_vport_find_by_fid(const struct mlxsw_sp_port *mlxsw_sp_port,
> return NULL;
> }
>
> +static inline struct mlxsw_sp_rif *
> +mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp,
> + const struct net_device *dev)
> +{
> + int i;
> +
> + for (i = 0; i < MLXSW_SP_RIF_MAX; i++)
> + if (mlxsw_sp->rifs[i] && mlxsw_sp->rifs[i]->dev == dev)
> + return mlxsw_sp->rifs[i];
> +
> + return NULL;
> +}
> +
Why not add the rif to mlxsw_sp_port which is the priv data for a mlxsw dev?
Powered by blists - more mailing lists