Netdev List
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: Leon Romanovsky <leonro@mellanox.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH mlx5-next 00/11] mlx5 core internal firmware events handling improvements
Date: Mon, 26 Nov 2018 22:16:27 +0000	[thread overview]
Message-ID: <643ea3baec8912db61452cef6c5d9d3c8d39f2e7.camel@mellanox.com> (raw)
In-Reply-To: <20181120221228.18365-1-saeedm@mellanox.com>

On Tue, 2018-11-20 at 14:12 -0800, Saeed Mahameed wrote:
> Hi
> 
> This patchset is for mlx5-next shared branch, and will be applied
> there
> once the review is done.
> 
> The main idea of this change is to define a flexible scalable and
> simpler low level mlx5 core APIs to upper level components for better
> features decoupling and maximum code locality and modularity.
> 
> Improve and simplify mlx5 core internal firmware and device async
> events
> handling and subscription, currently all async firmware events are
> handled in one place (switch case in eq.c) and every time we need to
> update one of the mlx5_core handlers or add new events handling to
> the
> system, the driver needs to be changed in many places in order to
> deliver
> the new event to its consumer.
> 
> To improve this we will use atomic_notifier_chain to fire firmware
> events
> at internal mlx5 core components such as eswitch/fpga/clock/FW
> tracer/etc..,
> this is to avoid explicit calls from low level mlx5_core to upper
> components
> and to simplify the mlx5_core API for future developments.
>     
> Provide register/unregister notifiers API and call the notifier chain
> on
> firmware async events.
>     
> Example to subscribe to a FW event:
> 
> struct mlx5_nb port_event;
>     
> MLX5_NB_INIT(&port_event, port_event_handler, PORT_CHANGE);
> mlx5_eq_notifier_register(mdev, &port_event);
>     
> Where:
>   - port_event_handler is the notifier block callback.
>   - PORT_EVENT is the suffix of MLX5_EVENT_TYPE_PORT_CHANGE (The
> event
>     type to subscribe to)
> 
> The above will guarantee that port_event_handler will receive all FW
> events of the type MLX5_EVENT_TYPE_PORT_CHANGE.
>     
> To receive all FW/HW events one can subscribe to
> MLX5_EVENT_TYPE_NOTIFY_ANY.
>  
> There can be only 128 types of firmware events each has its own
> 64Byte 
> EQE (Event Queue Element) data, we will have one
> atomic_notifier_chain
> per event type for maximum performance and verbosity.
> Each handler is going to receive the event_type as unsigned long and
> the event data as void pointer, exactly as defined in the notifier
> block
> handlers prototype.
>    
> This API is implemented in the first patch of this series all
> following
> patches are modifying the existing mlx5 components to use the new API
> to
> subscribe to FW events.
> 
> Thanks,
> Saeed.
> 
> ---
> 
> Saeed Mahameed (11):
>   net/mlx5: EQ, Introduce atomic notifier chain subscription API
>   net/mlx5: FWTrace, Use async events chain
>   net/mlx5: FPGA, Use async events chain
>   net/mlx5: Clock, Use async events chain
>   net/mlx5: E-Switch, Use async events chain
>   net/mlx5: FWPage, Use async events chain
>   net/mlx5: CmdIF, Use async events chain
>   net/mlx5: Resource tables, Use async events chain
>   net/mlx5: CQ ERR, Use async events chain
>   net/mlx5: Device events, Use async events chain
>   net/mlx5: Improve core device events handling
> 


Applied to mlx5-next branch.

Thanks!


      parent reply	other threads:[~2018-11-27  9:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 22:12 [PATCH mlx5-next 00/11] mlx5 core internal firmware events handling improvements Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 01/11] net/mlx5: EQ, Introduce atomic notifier chain subscription API Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 02/11] net/mlx5: FWTrace, Use async events chain Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 03/11] net/mlx5: FPGA, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 04/11] net/mlx5: Clock, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 05/11] net/mlx5: E-Switch, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 06/11] net/mlx5: FWPage, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 07/11] net/mlx5: CmdIF, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 08/11] net/mlx5: Resource tables, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 09/11] net/mlx5: CQ ERR, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 10/11] net/mlx5: Device events, " Saeed Mahameed
2018-11-20 22:12 ` [PATCH mlx5-next 11/11] net/mlx5: Improve core device events handling Saeed Mahameed
2018-11-26 22:16 ` Saeed Mahameed [this message]

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=643ea3baec8912db61452cef6c5d9d3c8d39f2e7.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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