Lines Matching refs:udata
199 struct ib_udata *udata, unsigned long addr) in alloc_cq_buf() argument
212 udata, addr); in alloc_cq_buf()
225 struct ib_udata *udata, unsigned long addr, in alloc_cq_db() argument
232 if (udata) { in alloc_cq_db()
234 udata->outlen >= offsetofend(typeof(*resp), cap_flags)) { in alloc_cq_db()
235 uctx = rdma_udata_to_drv_context(udata, in alloc_cq_db()
260 struct ib_udata *udata) in free_cq_db() argument
268 if (udata) { in free_cq_db()
269 uctx = rdma_udata_to_drv_context(udata, in free_cq_db()
298 static int get_cq_ucmd(struct hns_roce_cq *hr_cq, struct ib_udata *udata, in get_cq_ucmd() argument
304 ret = ib_copy_from_udata(ucmd, udata, min(udata->inlen, sizeof(*ucmd))); in get_cq_ucmd()
329 static int set_cqe_size(struct hns_roce_cq *hr_cq, struct ib_udata *udata, in set_cqe_size() argument
334 if (!udata) { in set_cqe_size()
339 if (udata->inlen >= offsetofend(typeof(*ucmd), cqe_size)) { in set_cqe_size()
359 struct ib_udata *udata = &attrs->driver_udata; in hns_roce_create_cq() local
375 if (udata) { in hns_roce_create_cq()
376 ret = get_cq_ucmd(hr_cq, udata, &ucmd); in hns_roce_create_cq()
383 ret = set_cqe_size(hr_cq, udata, &ucmd); in hns_roce_create_cq()
387 ret = alloc_cq_buf(hr_dev, hr_cq, udata, ucmd.buf_addr); in hns_roce_create_cq()
393 ret = alloc_cq_db(hr_dev, hr_cq, udata, ucmd.db_addr, &resp); in hns_roce_create_cq()
412 if (udata) { in hns_roce_create_cq()
414 ret = ib_copy_to_udata(udata, &resp, in hns_roce_create_cq()
415 min(udata->outlen, sizeof(resp))); in hns_roce_create_cq()
432 free_cq_db(hr_dev, hr_cq, udata); in hns_roce_create_cq()
441 int hns_roce_destroy_cq(struct ib_cq *ib_cq, struct ib_udata *udata) in hns_roce_destroy_cq() argument
448 free_cq_db(hr_dev, hr_cq, udata); in hns_roce_destroy_cq()