Lines Matching refs:cap
257 struct ib_qp_cap *cap, int is_user, int has_srq, in hns_roce_set_rq_size() argument
264 if (cap->max_recv_wr > hr_dev->caps.max_wqes || in hns_roce_set_rq_size()
265 cap->max_recv_sge > hr_dev->caps.max_rq_sg) { in hns_roce_set_rq_size()
267 cap->max_recv_wr, cap->max_recv_sge); in hns_roce_set_rq_size()
273 if (cap->max_recv_wr) { in hns_roce_set_rq_size()
280 if (is_user && (!cap->max_recv_wr || !cap->max_recv_sge)) { in hns_roce_set_rq_size()
286 max_cnt = cap->max_recv_wr > HNS_ROCE_MIN_WQE_NUM ? in hns_roce_set_rq_size()
287 cap->max_recv_wr : HNS_ROCE_MIN_WQE_NUM; in hns_roce_set_rq_size()
295 max_cnt = max(1U, cap->max_recv_sge); in hns_roce_set_rq_size()
301 cap->max_recv_wr = hr_qp->rq.max_post = hr_qp->rq.wqe_cnt; in hns_roce_set_rq_size()
302 cap->max_recv_sge = hr_qp->rq.max_gs; in hns_roce_set_rq_size()
339 struct ib_qp_cap *cap, in hns_roce_set_kernel_sq_size() argument
345 if (cap->max_send_wr > hr_dev->caps.max_wqes || in hns_roce_set_kernel_sq_size()
346 cap->max_send_sge > hr_dev->caps.max_sq_sg || in hns_roce_set_kernel_sq_size()
347 cap->max_inline_data > hr_dev->caps.max_sq_inline) { in hns_roce_set_kernel_sq_size()
357 max_cnt = cap->max_send_wr > HNS_ROCE_MIN_WQE_NUM ? in hns_roce_set_kernel_sq_size()
358 cap->max_send_wr : HNS_ROCE_MIN_WQE_NUM; in hns_roce_set_kernel_sq_size()
366 max_cnt = max(1U, cap->max_send_sge); in hns_roce_set_kernel_sq_size()
379 cap->max_send_wr = hr_qp->sq.max_post = hr_qp->sq.wqe_cnt; in hns_roce_set_kernel_sq_size()
380 cap->max_send_sge = hr_qp->sq.max_gs; in hns_roce_set_kernel_sq_size()
383 cap->max_inline_data = 0; in hns_roce_set_kernel_sq_size()
410 ret = hns_roce_set_rq_size(hr_dev, &init_attr->cap, !!ib_pd->uobject, in hns_roce_create_qp_common()
468 ret = hns_roce_set_kernel_sq_size(hr_dev, &init_attr->cap, in hns_roce_create_qp_common()