cq->comp_vector = attr->comp_vector % ibdev->num_comp_vectors;
cq->cq_handle = INVALID_MANA_HANDLE;
+ is_rnic_cq = mana_ib_is_rnic(mdev);
if (udata) {
if (udata->inlen < offsetof(struct mana_ib_create_cq, flags))
return err;
}
- is_rnic_cq = !!(ucmd.flags & MANA_IB_CREATE_RNIC_CQ);
-
if ((!is_rnic_cq && attr->cqe > mdev->adapter_caps.max_qp_wr) ||
attr->cqe > U32_MAX / COMP_ENTRY_SIZE) {
ibdev_dbg(ibdev, "CQE %d exceeding limit\n", attr->cqe);
ibucontext);
doorbell = mana_ucontext->doorbell;
} else {
- is_rnic_cq = true;
buf_size = MANA_PAGE_ALIGN(roundup_pow_of_two(attr->cqe * COMP_ENTRY_SIZE));
cq->cqe = buf_size / COMP_ENTRY_SIZE;
err = mana_ib_create_kernel_queue(mdev, buf_size, GDMA_CQ, &cq->queue);
#define MANA_IB_UVERBS_ABI_VERSION 1
enum mana_ib_create_cq_flags {
+ /* Reserved for backward compatibility. Legacy
+ * kernel versions use it to create CQs in RNIC
+ */
MANA_IB_CREATE_RNIC_CQ = 1 << 0,
};