.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "mlx5dv_create_cq" "3" "2018-9-1" "mlx5" "mlx5 Programmer\[cq]s Manual"
.hy
.SH NAME
.PP
mlx5dv_create_cq - creates a completion queue (CQ)
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/mlx5dv.h>

struct ibv_cq_ex *mlx5dv_create_cq(struct ibv_context *context,
                   struct ibv_cq_init_attr_ex *cq_attr,
                   struct mlx5dv_cq_init_attr *mlx5_cq_attr);
\f[R]
.fi
.SH DESCRIPTION
.PP
\f[B]mlx5dv_create_cq()\f[R] creates a completion queue (CQ) with
specific driver properties.
.SH ARGUMENTS
.PP
Please see \f[B]ibv_create_cq_ex(3)\f[R] man page for \f[B]context\f[R]
and \f[B]cq_attr\f[R]
.SS mlx5_cq_attr
.IP
.nf
\f[C]
struct mlx5dv_cq_init_attr {
    uint64_t comp_mask;
    uint8_t  cqe_comp_res_format;
    uint32_t flags;
    uint16_t cqe_size;
};
\f[R]
.fi
.TP
\f[I]comp_mask\f[R]
Bitmask specifying what fields in the structure are valid:
.RS
.PP
MLX5DV_CQ_INIT_ATTR_MASK_COMPRESSED_CQE enables creating a CQ in a mode
that few CQEs may be compressed into a single CQE, valid values in
\f[I]cqe_comp_res_format\f[R]
.PP
MLX5DV_CQ_INIT_ATTR_MASK_FLAGS valid values in \f[I]flags\f[R]
.PP
MLX5DV_CQ_INIT_ATTR_MASK_CQE_SIZE valid values in \f[I]cqe_size\f[R]
.RE
.TP
\f[I]cqe_comp_res_format\f[R]
A bitwise OR of the various CQE response formats of the responder side:
.RS
.PP
MLX5DV_CQE_RES_FORMAT_HASH CQE compression with hash
.PP
MLX5DV_CQE_RES_FORMAT_CSUM CQE compression with RX checksum
.PP
MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX CQE compression with stride index
.RE
.TP
\f[I]flags\f[R]
A bitwise OR of the various values described below:
.RS
.PP
MLX5DV_CQ_INIT_ATTR_FLAGS_CQE_PAD create a padded 128B CQE
.RE
.TP
\f[I]cqe_size\f[R]
configure the CQE size to be 64 or 128 bytes other values will fail
mlx5dv_create_cq.
.SH RETURN VALUE
.PP
\f[B]mlx5dv_create_cq()\f[R] returns a pointer to the created CQ, or
NULL if the request fails and errno will be set.
.SH SEE ALSO
.PP
\f[B]ibv_create_cq_ex\f[R](3),
.SH AUTHOR
.PP
Yonatan Cohen <yonatanc@mellanox.com>
