[v1,12/38] common/mlx5: glue event queue query
diff mbox series

Message ID 1579539790-3882-13-git-send-email-matan@mellanox.com
State Superseded, archived
Delegated to: Maxime Coquelin
Headers show
Series
  • Introduce mlx5 vDPA driver
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Matan Azrad Jan. 20, 2020, 5:02 p.m. UTC
The event queue is managed only by the kernel.

Add the rdma-core command in glue to query the kernel event queue
details.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/common/mlx5/mlx5_glue.c | 15 +++++++++++++++
 drivers/common/mlx5/mlx5_glue.h |  2 ++
 2 files changed, 17 insertions(+)

Patch
diff mbox series

diff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c
index e75e6bc..ac51e65 100644
--- a/drivers/common/mlx5/mlx5_glue.c
+++ b/drivers/common/mlx5/mlx5_glue.c
@@ -1045,6 +1045,20 @@ 
 #else
 	RTE_SET_USED(file);
 	RTE_SET_USED(domain);
+        return -ENOTSUP;
+#endif
+}
+
+static int
+mlx5_glue_devx_query_eqn(struct ibv_context *ctx, uint32_t cpus,
+			 uint32_t *eqn)
+{
+#ifdef HAVE_IBV_DEVX_OBJ
+	return mlx5dv_devx_query_eqn(ctx, cpus, eqn);
+#else
+	(void)ctx;
+	(void)cpus;
+	(void)eqn;
 	return -ENOTSUP;
 #endif
 }
@@ -1148,4 +1162,5 @@ 
 	.devx_qp_query = mlx5_glue_devx_qp_query,
 	.devx_port_query = mlx5_glue_devx_port_query,
 	.dr_dump_domain = mlx5_glue_dr_dump_domain,
+	.devx_query_eqn = mlx5_glue_devx_query_eqn,
 };
diff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h
index 33afaf4..fe51f97 100644
--- a/drivers/common/mlx5/mlx5_glue.h
+++ b/drivers/common/mlx5/mlx5_glue.h
@@ -259,6 +259,8 @@  struct mlx5_glue {
 			       uint32_t port_num,
 			       struct mlx5dv_devx_port *mlx5_devx_port);
 	int (*dr_dump_domain)(FILE *file, void *domain);
+	int (*devx_query_eqn)(struct ibv_context *context, uint32_t cpus,
+			      uint32_t *eqn);
 };
 
 const struct mlx5_glue *mlx5_glue;