[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150723211218.GB504@gospo.home.greyhouse.net>
Date: Thu, 23 Jul 2015 17:12:20 -0400
From: Andy Gospodarek <gospo@...ulusnetworks.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, idosch@...lanox.com,
eladr@...lanox.com, ogerlitz@...lanox.com, sfeldma@...il.com,
roopa@...ulusnetworks.com, f.fainelli@...il.com, tgraf@...g.ch,
ast@...mgrid.com, jhs@...atatu.com, daniel@...earbox.net,
john.fastabend@...il.com, simon.horman@...ronome.com,
linville@...driver.com, andy@...yhouse.net,
shm@...ulusnetworks.com, nhorman@...driver.com,
Jiri Pirko <jiri@...lanox.com>
Subject: Re: [patch net-next 3/4] mlxsw: Add interface to access registers
and process events
On Thu, Jul 23, 2015 at 05:43:35PM +0200, Jiri Pirko wrote:
> From: Ido Schimmel <idosch@...lanox.com>
>
> Add the ability to construct mailbox-style register access messages
> called EMADs with provisions to construct and parse the registers payload.
> Implement EMAD transaction layer which is responsible for the reliable
> transmission of EMADs.
> Also, add an infrastructure used by the switch driver to register for
> particular events generated by the device.
>
> Signed-off-by: Ido Schimmel <idosch@...lanox.com>
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
> Signed-off-by: Elad Raz <eladr@...lanox.com>
> ---
> drivers/net/ethernet/mellanox/mlxsw/core.c | 736 ++++++++++++++++
> drivers/net/ethernet/mellanox/mlxsw/core.h | 21 +
> drivers/net/ethernet/mellanox/mlxsw/emad.h | 127 +++
> drivers/net/ethernet/mellanox/mlxsw/port.h | 19 +
> drivers/net/ethernet/mellanox/mlxsw/reg.h | 1289 ++++++++++++++++++++++++++++
> 5 files changed, 2192 insertions(+)
> create mode 100644 drivers/net/ethernet/mellanox/mlxsw/emad.h
> create mode 100644 drivers/net/ethernet/mellanox/mlxsw/reg.h
>
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
> index 211ec9b..bd0f692 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/core.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
[...]
> + struct list_head event_listener_list;
> + struct {
> + struct sk_buff *resp_skb;
> + u64 tid;
> + wait_queue_head_t wait;
> + bool trans_active;
> + struct mutex lock; /* One EMAD transaction at a time. */
> + bool use_emad;
> + } emad;
> struct mlxsw_core_pcpu_stats __percpu *pcpu_stats;
> struct dentry *dbg_dir;
> struct {
[...]
> }
>
> INIT_LIST_HEAD(&mlxsw_core->rx_listener_list);
> + INIT_LIST_HEAD(&mlxsw_core->event_listener_list);
> mlxsw_core->driver = mlxsw_driver;
> mlxsw_core->bus = mlxsw_bus;
> mlxsw_core->bus_priv = bus_priv;
[...]
> + /* No reason to save item if we did not manage to register an RX
> + * listener for it.
> + */
> + list_add_rcu(&el_item->list, &mlxsw_core->event_listener_list);
> +
I see where 'event_listener_list' is defined and where entries are
added/removed, but where is the code that would receive these events and
presumably search this list so all handlers registered (currently just
PUDE) can handle events?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists