From: Andy Gospodarek <gospo@cumulusnetworks.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, idosch@mellanox.com,
eladr@mellanox.com, ogerlitz@mellanox.com, sfeldma@gmail.com,
roopa@cumulusnetworks.com, f.fainelli@gmail.com, tgraf@suug.ch,
ast@plumgrid.com, jhs@mojatatu.com, daniel@iogearbox.net,
john.fastabend@gmail.com, simon.horman@netronome.com,
linville@tuxdriver.com, andy@greyhouse.net,
shm@cumulusnetworks.com, nhorman@tuxdriver.com,
Jiri Pirko <jiri@mellanox.com>
Subject: Re: [patch net-next 3/4] mlxsw: Add interface to access registers and process events
Date: Thu, 23 Jul 2015 17:12:20 -0400 [thread overview]
Message-ID: <20150723211218.GB504@gospo.home.greyhouse.net> (raw)
In-Reply-To: <1437666216-3149-4-git-send-email-jiri@resnulli.us>
On Thu, Jul 23, 2015 at 05:43:35PM +0200, Jiri Pirko wrote:
> From: Ido Schimmel <idosch@mellanox.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@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> Signed-off-by: Elad Raz <eladr@mellanox.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?
next prev parent reply other threads:[~2015-07-23 21:12 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 15:43 [patch net-next 0/4] Introduce Mellanox Technologies Switch ASICs switchdev drivers Jiri Pirko
2015-07-23 15:43 ` [patch net-next 1/4] mlxsw: Introduce Mellanox switch driver core Jiri Pirko
2015-07-23 15:43 ` [patch net-next 2/4] mlxsw: Add PCI bus implementation Jiri Pirko
2015-07-24 4:52 ` Scott Feldman
2015-07-24 5:30 ` Jiri Pirko
2015-07-26 5:15 ` Scott Feldman
2015-07-26 6:49 ` Jiri Pirko
2015-07-23 15:43 ` [patch net-next 3/4] mlxsw: Add interface to access registers and process events Jiri Pirko
2015-07-23 21:12 ` Andy Gospodarek [this message]
2015-07-24 5:24 ` Jiri Pirko
2015-07-24 12:09 ` Andy Gospodarek
2015-07-24 5:13 ` Scott Feldman
2015-07-24 5:18 ` Jiri Pirko
2015-07-24 6:48 ` Elad Raz
2015-07-23 15:43 ` [patch net-next 4/4] mlxsw: Introduce Mellanox SwitchX-2 ASIC support Jiri Pirko
2015-07-23 17:19 ` Alexander Duyck
2015-07-23 19:42 ` Jiri Pirko
2015-07-26 2:45 ` Scott Feldman
2015-07-26 7:10 ` Jiri Pirko
2015-07-26 17:14 ` Jiri Pirko
2015-07-27 6:17 ` Rosen, Rami
2015-07-28 18:06 ` Jiri Pirko
2015-07-24 0:03 ` [patch net-next 0/4] Introduce Mellanox Technologies Switch ASICs switchdev drivers Scott Feldman
2015-07-24 0:38 ` Rustad, Mark D
2015-07-24 5:38 ` Jiri Pirko
2015-07-27 6:51 ` David Miller
2015-07-27 20:21 ` Scott Feldman
2015-07-27 20:27 ` Jiri Pirko
2015-07-27 21:21 ` 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=20150723211218.GB504@gospo.home.greyhouse.net \
--to=gospo@cumulusnetworks.com \
--cc=andy@greyhouse.net \
--cc=ast@plumgrid.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eladr@mellanox.com \
--cc=f.fainelli@gmail.com \
--cc=idosch@mellanox.com \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=ogerlitz@mellanox.com \
--cc=roopa@cumulusnetworks.com \
--cc=sfeldma@gmail.com \
--cc=shm@cumulusnetworks.com \
--cc=simon.horman@netronome.com \
--cc=tgraf@suug.ch \
/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).