mlx5dv_create_cq(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | RETURN VALUE | SEE ALSO | AUTHOR | COLOPHON

mlx5dv_create_cq(3)      mlx5 Programmer’s Manual     mlx5dv_create_cq(3)

NAME         top

       mlx5dv_create_cq - creates a completion queue (CQ)

SYNOPSIS         top

              #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);

DESCRIPTION         top

       mlx5dv_create_cq() creates a completion queue (CQ) with specific
       driver properties.

ARGUMENTS         top

       Please see ibv_create_cq_ex(3) man page for context and cq_attr

   mlx5_cq_attr
              struct mlx5dv_cq_init_attr {
                  uint64_t comp_mask;
                  uint8_t  cqe_comp_res_format;
                  uint32_t flags;
                  uint16_t cqe_size;
              };

       comp_mask
              Bitmask specifying what fields in the structure are valid:

              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 cqe_comp_res_format

              MLX5DV_CQ_INIT_ATTR_MASK_FLAGS valid values in flags

              MLX5DV_CQ_INIT_ATTR_MASK_CQE_SIZE valid values in cqe_size

       cqe_comp_res_format
              A bitwise OR of the various CQE response formats of the
              responder side:

              MLX5DV_CQE_RES_FORMAT_HASH CQE compression with hash

              MLX5DV_CQE_RES_FORMAT_CSUM CQE compression with RX checksum

              MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX CQE compression with
              stride index

       flags  A bitwise OR of the various values described below:

              MLX5DV_CQ_INIT_ATTR_FLAGS_CQE_PAD create a padded 128B CQE

       cqe_size
              configure the CQE size to be 64 or 128 bytes other values
              will fail mlx5dv_create_cq.

RETURN VALUE         top

       mlx5dv_create_cq() returns a pointer to the created CQ, or NULL if
       the request fails and errno will be set.

SEE ALSO         top

       ibv_create_cq_ex(3),

AUTHOR         top

       Yonatan Cohen ⟨yonatanc@mellanox.com⟩

COLOPHON         top

       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2025-08-11.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2025-08-04.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

mlx5                             2018-9-1             mlx5dv_create_cq(3)