efadv_create_cq - Create EFA specific Completion Queue (CQ)
#include <infiniband/efadv.h> struct ibv_cq_ex *efadv_create_cq(struct ibv_context *context, struct ibv_cq_init_attr_ex *attr_ex, struct efadv_cq_init_attr *efa_attr, uint32_t inlen); static inline int efadv_wc_read_sgid(struct efadv_cq *efadv_cq, union ibv_gid *sgid);
efadv_create_cq() creates a Completion Queue (CQ) with specific driver properties.
The argument attr_ex is an ibv_cq_init_attr_ex struct, as defined in <infiniband/verbs.h>.
The EFADV work completions APIs (efadv_wc_*) is an extension for IBV work completions API (ibv_wc_*) with efa specific features for polling fields in the completion. This may be used together with or without ibv_wc_* calls.
Use efadv_cq_from_ibv_cq_ex() to get the efadv_cq for accessing the work completion interface.
Compatibility is handled using the comp_mask and inlen fields.
struct efadv_cq_init_attr { uint64_t comp_mask; uint64_t wc_flags; uint64_t flags; struct { uint8_t *buffer; uint64_t length; uint64_t offset; int32_t fd; uint8_t reserved[4]; } ext_mem_dmabuf; };
inlen : In: Size of struct efadv_cq_init_attr.
comp_mask : Compatibility mask.
wc_flags : A bitwise OR of the various values described below.
EFADV_WC_EX_WITH_SGID: if source AH is unknown, require sgid in WC. EFADV_WC_EX_WITH_IS_UNSOLICITED: request for an option to check whether a receive WC is unsolicited.
flags : A bitwise OR of the various values described below.
EFADV_CQ_INIT_FLAGS_EXT_MEM_DMABUF: create CQ with external memory provided via dmabuf.
ext_mem_dmabuf : Structure containing information about external memory when using EFADV_CQ_INIT_FLAGS_EXT_MEM_DMABUF flag.
buffer: Pointer to the memory mapped in the process's virtual address space. The field is optional, but if not provided, the use of CQ poll interfaces should be avoided. length: Length of the memory region to use. fd: File descriptor of the dmabuf. offset: Offset within the dmabuf.
efadv_wc_read_sgid : Get the source GID field from the current completion. If the AH is known, a negative error value is returned.
efadv_wc_is_unsolicited : Check whether it's an unsolicited receive completion that has no matching work request. This function is available if the CQ was created with EFADV_WC_EX_WITH_IS_UNSOLICITED.
efadv_create_cq() returns a pointer to the created extended CQ, or NULL if the request fails.
efadv(7), ibv_create_cq_ex(3)
Daniel Kranzdorf dkkranzd@amazon.com