---
name: "efadv_query_cq"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/efadv_query_cq"
---

# efadv\_query\_cq(3)

Query EFA specific Completion Queue attributes

## NAME

efadv\_query\_cq - Query EFA specific Completion Queue attributes

## SYNOPSIS

-

  ```
  #include <infiniband/efadv.h>
  int efadv_query_cq(struct ibv_cq *ibvcq, struct efadv_cq_attr *attr,
                     uint32_t inlen);
  ```

## DESCRIPTION

**efadv\_query\_cq()** queries device-specific Completion Queue attributes.

Compatibility is handled using the comp\_mask and inlen fields.

-

  ```
  struct efadv_cq_attr {
      uint64_t comp_mask;
      uint8_t *buffer;
      uint32_t entry_size;
      uint32_t num_entries;
      uint32_t *doorbell;
  };
  ```

- *inlen*

  In: Size of struct efadv\_cq\_attr.

- *comp\_mask*

  Compatibility mask.

- *buffer*

  Completion queue buffer.

- *entry\_size*

  Size of each completion queue entry.

- *num\_entries*

  Maximal number of entries in the completion queue.

- *doorbell*

  Reverse doorbell used to update the device of polled entries and to request notifications. NULL when not in use for this Completion Queue.

## RETURN VALUE

**efadv\_query\_cq()** returns 0 on success, or the value of errno on failure (which indicates the failure reason).

## SEE ALSO

[**efadv**(7)](/efadv/7.md)

## NOTES

- •

  Compatibility mask (comp\_mask) is an out field and currently has no values.

## AUTHORS

Michael Margolin ⟨mrgolin@amazon.com⟩\\c
