Home
last modified time | relevance | path

Searched refs:srq (Results 1 – 25 of 108) sorted by relevance

12345

/openbmc/linux/drivers/infiniband/hw/mthca/
H A Dmthca_srq.c149 mthca_buf_free(dev, srq->max << srq->wqe_shift, &srq->queue, in mthca_free_srq_buf()
150 srq->is_direct, &srq->mr); in mthca_free_srq_buf()
171 &srq->queue, &srq->is_direct, pd, 1, &srq->mr); in mthca_alloc_srq_buf()
201 srq->last = get_wqe(srq, srq->max - 1); in mthca_alloc_srq_buf()
224 srq->max = roundup_pow_of_two(srq->max + 1); in mthca_alloc_srq()
226 srq->max = srq->max + 1; in mthca_alloc_srq()
248 srq->srqn, &srq->db); in mthca_alloc_srq()
295 srq->last_free = srq->max - 1; in mthca_alloc_srq()
452 event.element.srq = &srq->ibsrq; in mthca_srq_event()
474 last_free = get_wqe(srq, srq->last_free); in mthca_free_srq_wqe()
[all …]
/openbmc/linux/drivers/infiniband/hw/hns/
H A Dhns_roce_srq.c19 if (srq) in hns_roce_srq_event()
23 if (!srq) { in hns_roce_srq_event()
28 srq->event(srq, event_type); in hns_roce_srq_event()
31 complete(&srq->free); in hns_roce_srq_event()
74 srq->srqn = id; in alloc_srqn()
104 srq->srqn); in hns_roce_create_srqc()
154 ret, srq->srqn); in free_srqc()
255 if (!srq->wrid) in alloc_srq_wrid()
264 srq->wrid = NULL; in free_srq_wrid()
308 srq->max_gs = roundup_pow_of_two(attr->max_sge + srq->rsv_sge); in set_srq_basic_param()
[all …]
/openbmc/linux/drivers/infiniband/hw/mlx4/
H A Dsrq.c44 return mlx4_buf_offset(&srq->buf, n << srq->msrq.wqe_shift); in get_wqe()
117 srq->umem = in mlx4_ib_create_srq()
149 srq->tail = srq->msrq.max - 1; in mlx4_ib_create_srq()
172 srq->wrid = kvmalloc_array(srq->msrq.max, in mlx4_ib_create_srq()
186 &srq->mtt, srq->db.dma, &srq->msrq); in mlx4_ib_create_srq()
191 srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn; in mlx4_ib_create_srq()
300 next = get_wqe(srq, srq->tail); in mlx4_ib_free_srq_wqe()
333 if (unlikely(srq->head == srq->tail)) { in mlx4_ib_post_srq_recv()
339 srq->wrid[srq->head] = wr->wr_id; in mlx4_ib_post_srq_recv()
341 next = get_wqe(srq, srq->head); in mlx4_ib_post_srq_recv()
[all …]
/openbmc/linux/drivers/infiniband/hw/mlx5/
H A Dsrq.c125 mlx5_init_fbc(srq->buf.frags, srq->msrq.wqe_shift, ilog2(srq->msrq.max), in create_srq_kernel()
128 srq->head = 0; in create_srq_kernel()
129 srq->tail = srq->msrq.max - 1; in create_srq_kernel()
151 srq->wq_sig = 0; in create_srq_kernel()
179 &srq->db); in destroy_srq_user()
293 srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn; in mlx5_ib_create_srq()
398 next = get_wqe(srq, srq->tail); in mlx5_ib_free_srq_wqe()
433 if (unlikely(srq->head == srq->tail)) { in mlx5_ib_post_srq_recv()
439 srq->wrid[srq->head] = wr->wr_id; in mlx5_ib_post_srq_recv()
441 next = get_wqe(srq, srq->head); in mlx5_ib_post_srq_recv()
[all …]
H A Dsrq_cmd.c88 if (srq) in mlx5_cmd_get_srq()
92 return srq; in mlx5_cmd_get_srq()
158 srq->uid = in->uid; in create_srq_cmd()
264 srq->uid = in->uid; in create_xrc_srq_cmd()
377 srq->uid = in->uid; in create_rmp_cmd()
653 err = xa_err(xa_store_irq(&table->array, srq->srqn, srq, GFP_KERNEL)); in mlx5_cmd_create_srq()
672 tmp = xa_cmpxchg_irq(&table->array, srq->srqn, srq, XA_ZERO_ENTRY, 0); in mlx5_cmd_destroy_srq()
683 xa_cmpxchg_irq(&table->array, srq->srqn, XA_ZERO_ENTRY, srq, 0); in mlx5_cmd_destroy_srq()
742 if (srq) in srq_event_notifier()
746 if (!srq) in srq_event_notifier()
[all …]
H A Dsrq.h48 void (*event)(struct mlx5_core_srq *srq, enum mlx5_event e);
58 int mlx5_cmd_create_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
60 int mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq);
61 int mlx5_cmd_query_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
63 int mlx5_cmd_arm_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
/openbmc/linux/drivers/infiniband/sw/rxe/
H A Drxe_srq.c55 srq->srq_num = srq->elem.index; in rxe_srq_from_init()
80 srq->rq.queue = q; in rxe_srq_from_init()
103 if (srq->error) { in rxe_srq_chk_attr()
120 if (srq->limit && (attr->max_wr < srq->limit)) { in rxe_srq_chk_attr()
122 attr->max_wr, srq->limit); in rxe_srq_chk_attr()
180 srq->limit = attr->srq_limit; in rxe_srq_from_attr()
186 srq->rq.queue = NULL; in rxe_srq_from_attr()
192 struct rxe_srq *srq = container_of(elem, typeof(*srq), elem); in rxe_srq_cleanup() local
194 if (srq->pd) in rxe_srq_cleanup()
195 rxe_put(srq->pd); in rxe_srq_cleanup()
[all …]
H A Drxe.h50 #define rxe_dbg_srq(srq, fmt, ...) ibdev_dbg((srq)->ibsrq.device, \ argument
51 "srq#%d %s: " fmt, (srq)->elem.index, __func__, ##__VA_ARGS__)
71 #define rxe_err_srq(srq, fmt, ...) ibdev_err_ratelimited((srq)->ibsrq.device, \ argument
72 "srq#%d %s: " fmt, (srq)->elem.index, __func__, ##__VA_ARGS__)
92 #define rxe_info_srq(srq, fmt, ...) ibdev_info_ratelimited((srq)->ibsrq.device, \ argument
93 "srq#%d %s: " fmt, (srq)->elem.index, __func__, ##__VA_ARGS__)
H A Drxe_verbs.c372 struct rxe_srq *srq = to_rsrq(ibsrq); in rxe_create_srq() local
405 srq->pd = pd; in rxe_create_srq()
416 cleanup_err = rxe_cleanup(srq); in rxe_create_srq()
428 struct rxe_srq *srq = to_rsrq(ibsrq); in rxe_modify_srq() local
456 rxe_dbg_srq(srq, "bad attr"); in rxe_modify_srq()
472 if (srq->error) { in rxe_query_srq()
479 attr->max_sge = srq->rq.max_sge; in rxe_query_srq()
480 attr->srq_limit = srq->limit; in rxe_query_srq()
498 err = post_one_recv(&srq->rq, wr); in rxe_post_srq_recv()
519 err = rxe_cleanup(srq); in rxe_destroy_srq()
[all …]
H A Drxe_qp.c334 if (!qp->srq) { in rxe_qp_init_resp()
358 struct rxe_srq *srq = init->srq ? to_rsrq(init->srq) : NULL; in rxe_qp_from_init() local
364 if (srq) in rxe_qp_from_init()
365 rxe_get(srq); in rxe_qp_from_init()
370 qp->srq = srq; in rxe_qp_from_init()
402 qp->srq = NULL; in rxe_qp_from_init()
404 if (srq) in rxe_qp_from_init()
405 rxe_put(srq); in rxe_qp_from_init()
420 init->srq = qp->ibqp.srq; in rxe_qp_to_init()
426 if (!qp->srq) { in rxe_qp_to_init()
[all …]
/openbmc/linux/drivers/infiniband/sw/rdmavt/
H A Dsrq.c58 if (rvt_alloc_rq(&srq->rq, srq->rq.size * sz, in rvt_create_srq()
71 srq->ip = rvt_create_mmap_info(dev, s, udata, srq->rq.wq); in rvt_create_srq()
99 if (srq->ip) { in rvt_create_srq()
108 kfree(srq->ip); in rvt_create_srq()
110 rvt_free_rq(&srq->rq); in rvt_create_srq()
173 owq = srq->rq.wq; in rvt_modify_srq()
177 okwq = srq->rq.kwq; in rvt_modify_srq()
181 if (head >= srq->rq.size || tail >= srq->rq.size) { in rvt_modify_srq()
227 if (srq->ip) { in rvt_modify_srq()
302 if (srq->ip) in rvt_destroy_srq()
[all …]
/openbmc/linux/drivers/infiniband/hw/vmw_pvrdma/
H A Dpvrdma_srq.c137 spin_lock_init(&srq->lock); in pvrdma_create_srq()
150 if (IS_ERR(srq->umem)) { in pvrdma_create_srq()
151 ret = PTR_ERR(srq->umem); in pvrdma_create_srq()
155 srq->npages = ib_umem_num_dma_blocks(srq->umem, PAGE_SIZE); in pvrdma_create_srq()
157 if (srq->npages < 0 || srq->npages > PVRDMA_PAGE_DIR_MAX_PAGES) { in pvrdma_create_srq()
164 ret = pvrdma_page_dir_init(dev, &srq->pdir, srq->npages, false); in pvrdma_create_srq()
171 pvrdma_page_dir_insert_umem(&srq->pdir, srq->umem, 0); in pvrdma_create_srq()
176 cmd->nchunks = srq->npages; in pvrdma_create_srq()
194 dev->srq_tbl[srq->srq_handle % dev->dsr->caps.max_srq] = srq; in pvrdma_create_srq()
209 ib_umem_release(srq->umem); in pvrdma_create_srq()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/
H A Dsrq.c46 struct mlx4_srq *srq; in mlx4_srq_event() local
51 if (srq) in mlx4_srq_event()
52 refcount_inc(&srq->refcount); in mlx4_srq_event()
58 srq->event(srq, event_type); in mlx4_srq_event()
61 complete(&srq->free); in mlx4_srq_event()
176 err = radix_tree_insert(&srq_table->tree, srq->srqn, srq); in mlx4_srq_alloc()
189 srq->srqn); in mlx4_srq_alloc()
207 init_completion(&srq->free); in mlx4_srq_alloc()
236 complete(&srq->free); in mlx4_srq_free()
295 struct mlx4_srq *srq; in mlx4_srq_lookup() local
[all …]
/openbmc/linux/drivers/infiniband/hw/cxgb4/
H A Dt4.h427 return srq->size - 1 - srq->in_use; in t4_srq_avail()
433 if (++srq->pidx == srq->size) in t4_srq_produce()
436 if (srq->wq_pidx >= srq->size * T4_RQ_NUM_SLOTS) in t4_srq_produce()
437 srq->wq_pidx %= srq->size * T4_RQ_NUM_SLOTS; in t4_srq_produce()
438 srq->queue[srq->size].status.host_pidx = srq->pidx; in t4_srq_produce()
445 if (++srq->pending_pidx == srq->size) in t4_srq_produce_pending_wr()
453 if (++srq->pending_cidx == srq->size) in t4_srq_consume_pending_wr()
466 if (srq->cidx == srq->size) in t4_srq_consume_ooo()
468 srq->queue[srq->size].status.host_cidx = srq->cidx; in t4_srq_consume_ooo()
475 if (++srq->cidx == srq->size) in t4_srq_consume()
[all …]
H A Dcq.c470 srq->sw_rq[srq->pidx].valid = 1; in post_pending_srq_wrs()
474 srq->cidx, srq->pidx, srq->wq_pidx, in post_pending_srq_wrs()
475 srq->in_use, srq->size, in post_pending_srq_wrs()
502 srq->wq_pidx, srq->in_use, srq->size, in reap_srq_cqe()
505 while (srq->ooo_count && !srq->sw_rq[srq->cidx].valid) { in reap_srq_cqe()
508 srq->wq_pidx, srq->in_use, in reap_srq_cqe()
509 srq->size, srq->ooo_count, in reap_srq_cqe()
519 srq->pidx, srq->wq_pidx, in reap_srq_cqe()
520 srq->in_use, srq->size, in reap_srq_cqe()
765 srq ? &srq->wq : NULL); in __c4iw_poll_cq_one()
[all …]
H A Dqp.c1347 __func__, srq->cidx, srq->pidx, srq->wq_pidx, in defer_srq_wr()
1348 srq->in_use, srq->ooo_count, in defer_srq_wr()
1350 srq->pending_pidx, srq->pending_in_use); in defer_srq_wr()
1401 srq->wq.sw_rq[srq->wq.pidx].valid) { in c4iw_post_srq_recv()
1405 srq->wq.sw_rq[srq->wq.pidx].valid = 1; in c4iw_post_srq_recv()
1409 srq->wq.pidx, srq->wq.wq_pidx, in c4iw_post_srq_recv()
2327 qhp->srq = to_c4iw_srq(attrs->srq); in c4iw_create_qp()
2421 event.element.srq = &srq->ibsrq; in c4iw_dispatch_srq_limit_reached_event()
2496 res->u.srq.srqid = cpu_to_be32(srq->idx); in free_srq_queue()
2608 res->u.srq.srqid = cpu_to_be32(srq->idx); in alloc_srq_queue()
[all …]
/openbmc/linux/drivers/infiniband/sw/siw/
H A Dsiw_verbs.c402 if (attrs->srq) { in siw_create_qp()
408 qp->srq = to_siw_srq(attrs->srq); in siw_create_qp()
534 qp_init_attr->srq = base_qp->srq; in siw_query_qp()
1618 if (srq->limit) in siw_create_srq()
1624 srq->recvq = in siw_create_srq()
1627 srq->recvq = vcalloc(srq->num_rqe, sizeof(struct siw_rqe)); in siw_create_srq()
1637 srq->srq_entry = in siw_create_srq()
1662 if (srq->recvq) { in siw_create_srq()
1752 vfree(srq->recvq); in siw_destroy_srq()
1790 u32 idx = srq->rq_put % srq->num_rqe; in siw_post_srq_recv()
[all …]
H A Dsiw_qp_rx.c338 srq = qp->srq; in siw_rqe_get()
339 if (srq) { in siw_rqe_get()
344 rqe = &srq->recvq[srq->rq_get % srq->num_rqe]; in siw_rqe_get()
378 if (srq) in siw_rqe_get()
382 if (!srq) { in siw_rqe_get()
385 if (srq->armed) { in siw_rqe_get()
387 u32 off = (srq->rq_get + srq->limit) % in siw_rqe_get()
388 srq->num_rqe; in siw_rqe_get()
396 srq->rq_get++; in siw_rqe_get()
400 if (srq) { in siw_rqe_get()
[all …]
/openbmc/linux/drivers/infiniband/hw/bnxt_re/
H A Dqplib_fp.c643 srq->swq = kcalloc(srq->hwq.max_elements, sizeof(*srq->swq), in bnxt_qplib_create_srq()
679 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_create_srq()
682 srq->dbinfo.hwq = &srq->hwq; in bnxt_qplib_create_srq()
683 srq->dbinfo.xid = srq->id; in bnxt_qplib_create_srq()
684 srq->dbinfo.db = srq->dpi->dbr; in bnxt_qplib_create_srq()
762 if (srq->start_idx == srq->last_idx) { in bnxt_qplib_post_srq_recv()
769 srq->start_idx = srq->swq[next].next_idx; in bnxt_qplib_post_srq_recv()
2576 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_release_srqe()
2617 srq = qp->srq; in bnxt_qplib_cq_process_res_rc()
2702 srq = qp->srq; in bnxt_qplib_cq_process_res_ud()
[all …]
/openbmc/linux/drivers/infiniband/core/
H A Duverbs_std_types_srq.c14 struct ib_srq *srq = uobject->object; in uverbs_free_srq() local
17 enum ib_srq_type srq_type = srq->srq_type; in uverbs_free_srq()
20 ret = ib_destroy_srq_user(srq, &attrs->driver_udata); in uverbs_free_srq()
46 struct ib_srq *srq; in UVERBS_HANDLER() local
107 srq = ib_create_srq_user(pd, &attr, obj, &attrs->driver_udata); in UVERBS_HANDLER()
108 if (IS_ERR(srq)) { in UVERBS_HANDLER()
109 ret = PTR_ERR(srq); in UVERBS_HANDLER()
113 obj->uevent.uobject.object = srq; in UVERBS_HANDLER()
131 &srq->ext.xrc.srq_num, in UVERBS_HANDLER()
132 sizeof(srq->ext.xrc.srq_num)); in UVERBS_HANDLER()
H A Dverbs.c1016 if (!srq) in ib_create_srq_user()
1020 srq->pd = pd; in ib_create_srq_user()
1044 if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd) in ib_create_srq_user()
1048 kfree(srq); in ib_create_srq_user()
1054 return srq; in ib_create_srq_user()
1083 ret = srq->device->ops.destroy_srq(srq, udata); in ib_destroy_srq_user()
1088 if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd) in ib_destroy_srq_user()
1093 kfree(srq); in ib_destroy_srq_user()
1220 qp->srq = attr->srq; in create_qp()
1307 if (qp->srq) in ib_qp_usecnt_inc()
[all …]
H A Duverbs_std_types_qp.c93 struct ib_srq *srq = NULL; in UVERBS_HANDLER() local
217 srq = uverbs_attr_get_obj(attrs, in UVERBS_HANDLER()
219 if (!IS_ERR(srq)) { in UVERBS_HANDLER()
220 if ((srq->srq_type == IB_SRQT_XRC && in UVERBS_HANDLER()
222 (srq->srq_type != IB_SRQT_XRC && in UVERBS_HANDLER()
225 attr.srq = srq; in UVERBS_HANDLER()
/openbmc/linux/drivers/infiniband/hw/ocrdma/
H A Docrdma_verbs.c1190 if (!srq) { in ocrdma_copy_qp_uresp()
1217 if (!srq) { in ocrdma_copy_qp_uresp()
1626 if (qp->srq) { in ocrdma_discard_cqes()
1661 if (!qp->srq) { in ocrdma_del_flush_qp()
1719 if (!qp->srq) in ocrdma_destroy_qp()
1781 srq->pd = pd; in ocrdma_create_srq()
1788 srq->rqe_wr_id_tbl = kcalloc(srq->rq.max_cnt, sizeof(u64), in ocrdma_create_srq()
1795 srq->bit_fields_len = (srq->rq.max_cnt / 32) + in ocrdma_create_srq()
1862 if (srq->pd->uctx) in ocrdma_destroy_srq()
1863 ocrdma_del_mmap(srq->pd->uctx, (u64) srq->rq.pa, in ocrdma_destroy_srq()
[all …]
/openbmc/linux/drivers/net/
H A Deql.c264 static int eql_enslave(struct net_device *dev, slaving_request_t __user *srq);
265 static int eql_emancipate(struct net_device *dev, slaving_request_t __user *srq);
416 slaving_request_t srq; in eql_enslave() local
418 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t))) in eql_enslave()
421 slave_dev = __dev_get_by_name(&init_net, srq.slave_name); in eql_enslave()
436 s->priority = srq.priority; in eql_enslave()
437 s->priority_bps = srq.priority; in eql_enslave()
438 s->priority_Bps = srq.priority / 8; in eql_enslave()
458 slaving_request_t srq; in eql_emancipate() local
461 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t))) in eql_emancipate()
[all …]
/openbmc/linux/drivers/infiniband/hw/qedr/
H A Dverbs.c1372 if (attrs->srq) in qedr_set_common_qp_params()
1373 qp->srq = get_qedr_srq(attrs->srq); in qedr_set_common_qp_params()
1449 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_free_srq_user_params()
1482 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_init_srq_user_params()
1484 DP_ERR(srq->dev, in qedr_init_srq_user_params()
1568 srq->dev = dev; in qedr_create_srq()
1632 rc = xa_insert_irq(&dev->srqs, srq->srq_id, srq, GFP_KERNEL); in qedr_create_srq()
1671 srq->srq_id); in qedr_destroy_srq()
1791 if (!qp->srq) { in qedr_iwarp_populate_user_qp()
2152 if (!qp->srq) { in qedr_cleanup_kernel()
[all …]

12345