[dpdk-dev] [PATCH v1 3/6] net/mlx5: add a function to rdma-core glue
Nélio Laranjeiro
nelio.laranjeiro at 6wind.com
Mon Mar 12 10:13:39 CET 2018
On Fri, Mar 09, 2018 at 05:25:29PM -0800, Yongseok Koh wrote:
> mlx5dv_create_wq() is added.
>
> Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> ---
> drivers/net/mlx5/mlx5_glue.c | 9 +++++++++
> drivers/net/mlx5/mlx5_glue.h | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
> index 1c4396ada..e33fc76b5 100644
> --- a/drivers/net/mlx5/mlx5_glue.c
> +++ b/drivers/net/mlx5/mlx5_glue.c
> @@ -287,6 +287,14 @@ mlx5_glue_dv_create_cq(struct ibv_context *context,
> return mlx5dv_create_cq(context, cq_attr, mlx5_cq_attr);
> }
>
> +static struct ibv_wq *
> +mlx5_glue_dv_create_wq(struct ibv_context *context,
> + struct ibv_wq_init_attr *wq_attr,
> + struct mlx5dv_wq_init_attr *mlx5_wq_attr)
> +{
> + return mlx5dv_create_wq(context, wq_attr, mlx5_wq_attr);
> +}
> +
> static int
> mlx5_glue_dv_query_device(struct ibv_context *ctx,
> struct mlx5dv_context *attrs_out)
> @@ -347,6 +355,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){
> .port_state_str = mlx5_glue_port_state_str,
> .cq_ex_to_cq = mlx5_glue_cq_ex_to_cq,
> .dv_create_cq = mlx5_glue_dv_create_cq,
> + .dv_create_wq = mlx5_glue_dv_create_wq,
> .dv_query_device = mlx5_glue_dv_query_device,
> .dv_set_context_attr = mlx5_glue_dv_set_context_attr,
> .dv_init_obj = mlx5_glue_dv_init_obj,
> diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
> index b5efee3b6..21a713961 100644
> --- a/drivers/net/mlx5/mlx5_glue.h
> +++ b/drivers/net/mlx5/mlx5_glue.h
> @@ -100,6 +100,10 @@ struct mlx5_glue {
> (struct ibv_context *context,
> struct ibv_cq_init_attr_ex *cq_attr,
> struct mlx5dv_cq_init_attr *mlx5_cq_attr);
> + struct ibv_wq *(*dv_create_wq)
> + (struct ibv_context *context,
> + struct ibv_wq_init_attr *wq_attr,
> + struct mlx5dv_wq_init_attr *mlx5_wq_attr);
> int (*dv_query_device)(struct ibv_context *ctx_in,
> struct mlx5dv_context *attrs_out);
> int (*dv_set_context_attr)(struct ibv_context *ibv_ctx,
> --
> 2.11.0
You missed to change the GLUE ABI version, it must be updated.
Regards,
--
Nélio Laranjeiro
6WIND
More information about the dev
mailing list