.\" Automatically generated by Pandoc 1.19.2.4
.\"
.TH "mlx5dv_create_cq" "3" "2018\-9\-1" "mlx5" "mlx5 Programmer\[aq]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[]
.fi
.SH DESCRIPTION
.PP
\f[B]mlx5dv_create_cq()\f[] creates a completion queue (CQ) with
specific driver properties.
.SH ARGUMENTS
.PP
Please see \f[B]ibv_create_cq_ex(3)\f[] man page for \f[B]context\f[]
and \f[B]cq_attr\f[]
.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[]
.fi
.TP
.B \f[I]comp_mask\f[]
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[]
.PP
MLX5DV_CQ_INIT_ATTR_MASK_FLAGS valid values in \f[I]flags\f[]
.PP
MLX5DV_CQ_INIT_ATTR_MASK_CQE_SIZE valid values in \f[I]cqe_size\f[]
.RE
.TP
.B \f[I]cqe_comp_res_format\f[]
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
.B \f[I]flags\f[]
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
.B \f[I]cqe_size\f[]
configure the CQE size to be 64 or 128 bytes other values will fail
mlx5dv_create_cq.
.RS
.RE
.SH RETURN VALUE
.PP
\f[B]mlx5dv_create_cq()\f[] 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[](3),
.SH AUTHOR
.PP
Yonatan Cohen <yonatanc@mellanox.com>
