From: Matan Azrad Date: Wed, 29 Jan 2020 12:38:35 +0000 (+0000) Subject: common/mlx5: glue event queue query X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=979ab2b985a4a8b2ce36c9ef7bf33dc43e9aedaa;p=dpdk.git common/mlx5: glue event queue query 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 Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c index e75e6bc5a8..fedce77af4 100644 --- a/drivers/common/mlx5/mlx5_glue.c +++ b/drivers/common/mlx5/mlx5_glue.c @@ -1049,6 +1049,20 @@ mlx5_glue_dr_dump_domain(FILE *file, void *domain) #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 +} + alignas(RTE_CACHE_LINE_SIZE) const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){ .version = MLX5_GLUE_VERSION, @@ -1148,4 +1162,5 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){ .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 33afaf444d..fe51f972b9 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;