All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Yishai Hadas <yishaih@mellanox.com>,
	linux-netdev <netdev@vger.kernel.org>
Subject: [PATCH mlx5-next 05/12] net/mlx5: Report a CQ error event only when a handler was set
Date: Thu, 13 Jun 2019 09:46:32 +0300	[thread overview]
Message-ID: <20190613064639.30898-6-leon@kernel.org> (raw)
In-Reply-To: <20190613064639.30898-1-leon@kernel.org>

From: Yishai Hadas <yishaih@mellanox.com>

Report a CQ error event only when a handler was set.

This enables mlx5_ib to not set a handler upon CQ creation and use some
other mechanism to get this event as of other events by the
mlx5_eq_notifier_register API.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
index 5971c1870e0d..c2a679657c34 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
@@ -494,7 +494,8 @@ static int cq_err_event_notifier(struct notifier_block *nb,
 		return NOTIFY_OK;
 	}
 
-	cq->event(cq, type);
+	if (cq->event)
+		cq->event(cq, type);
 
 	mlx5_cq_put(cq);
 
-- 
2.20.1

  parent reply	other threads:[~2019-06-13  6:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190613064639.30898-1-leon@kernel.org>
2019-06-13  6:46 ` [PATCH mlx5-next 01/12] net/mlx5: Fix mlx5_core_destroy_cq() error flow Leon Romanovsky
2019-06-13  6:46 ` [PATCH mlx5-next 02/12] net/mlx5: Use event mask based on device capabilities Leon Romanovsky
2019-06-13  6:46 ` [PATCH mlx5-next 03/12] net/mlx5: Expose the API to register for ANY event Leon Romanovsky
2019-06-13  6:46 ` [PATCH mlx5-next 04/12] net/mlx5: mlx5_core_create_cq() enhancements Leon Romanovsky
2019-06-13  6:46 ` Leon Romanovsky [this message]
2019-06-13  6:46 ` [PATCH mlx5-next 06/12] net/mlx5: Report EQE data upon CQ completion Leon Romanovsky
2019-06-13  6:46 ` [PATCH mlx5-next 07/12] net/mlx5: Expose device definitions for object events Leon Romanovsky
2019-06-13  6:46 ` [PATCH rdma-next 08/12] IB/mlx5: Introduce MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD Leon Romanovsky
2019-06-13  6:46 ` [PATCH rdma-next 09/12] IB/mlx5: Register DEVX with mlx5_core to get async events Leon Romanovsky
2019-06-13  6:46 ` [PATCH rdma-next 10/12] IB/mlx5: Enable subscription for device events over DEVX Leon Romanovsky
2019-06-13  6:46 ` [PATCH rdma-next 11/12] IB/mlx5: Implement DEVX dispatching event Leon Romanovsky
2019-06-13  6:46 ` [PATCH rdma-next 12/12] IB/mlx5: Add DEVX support for CQ events Leon Romanovsky
     [not found] <20190613062640.28958-1-leon@kernel.org>
2019-06-13  6:26 ` [PATCH mlx5-next 05/12] net/mlx5: Report a CQ error event only when a handler was set Leon Romanovsky

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=20190613064639.30898-6-leon@kernel.org \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=yishaih@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.