Lines Matching refs:msrq

125 	mlx5_init_fbc(srq->buf.frags, srq->msrq.wqe_shift, ilog2(srq->msrq.max),  in create_srq_kernel()
129 srq->tail = srq->msrq.max - 1; in create_srq_kernel()
132 for (i = 0; i < srq->msrq.max; i++) { in create_srq_kernel()
135 cpu_to_be16((i + 1) & (srq->msrq.max - 1)); in create_srq_kernel()
146 srq->wrid = kvmalloc_array(srq->msrq.max, sizeof(u64), GFP_KERNEL); in create_srq_kernel()
218 srq->msrq.max = roundup_pow_of_two(init_attr->attr.max_wr + 1); in mlx5_ib_create_srq()
219 srq->msrq.max_gs = init_attr->attr.max_sge; in mlx5_ib_create_srq()
222 srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg); in mlx5_ib_create_srq()
223 if (desc_size == 0 || srq->msrq.max_gs > desc_size) in mlx5_ib_create_srq()
231 srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) / in mlx5_ib_create_srq()
233 srq->msrq.wqe_shift = ilog2(desc_size); in mlx5_ib_create_srq()
234 buf_size = srq->msrq.max * desc_size; in mlx5_ib_create_srq()
251 in.log_size = ilog2(srq->msrq.max); in mlx5_ib_create_srq()
252 in.wqe_shift = srq->msrq.wqe_shift - 4; in mlx5_ib_create_srq()
280 err = mlx5_cmd_create_srq(dev, &srq->msrq, &in); in mlx5_ib_create_srq()
287 mlx5_ib_dbg(dev, "create SRQ with srqn 0x%x\n", srq->msrq.srqn); in mlx5_ib_create_srq()
289 srq->msrq.event = mlx5_ib_srq_event; in mlx5_ib_create_srq()
290 srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn; in mlx5_ib_create_srq()
294 .srqn = srq->msrq.srqn, in mlx5_ib_create_srq()
305 init_attr->attr.max_wr = srq->msrq.max - 1; in mlx5_ib_create_srq()
310 mlx5_cmd_destroy_srq(dev, &srq->msrq); in mlx5_ib_create_srq()
333 if (attr->srq_limit >= srq->msrq.max) in mlx5_ib_modify_srq()
337 ret = mlx5_cmd_arm_srq(dev, &srq->msrq, attr->srq_limit, 1); in mlx5_ib_modify_srq()
358 ret = mlx5_cmd_query_srq(dev, &srq->msrq, out); in mlx5_ib_query_srq()
363 srq_attr->max_wr = srq->msrq.max - 1; in mlx5_ib_query_srq()
364 srq_attr->max_sge = srq->msrq.max_gs; in mlx5_ib_query_srq()
374 struct mlx5_ib_srq *msrq = to_msrq(srq); in mlx5_ib_destroy_srq() local
377 ret = mlx5_cmd_destroy_srq(dev, &msrq->msrq); in mlx5_ib_destroy_srq()
382 destroy_srq_user(srq->pd, msrq, udata); in mlx5_ib_destroy_srq()
384 destroy_srq_kernel(dev, msrq); in mlx5_ib_destroy_srq()
424 if (unlikely(wr->num_sge > srq->msrq.max_gs)) { in mlx5_ib_post_srq_recv()
448 if (i < srq->msrq.max_avail_gather) { in mlx5_ib_post_srq_recv()