/linux/drivers/infiniband/hw/mthca/ |
A D | mthca_srq.c | 149 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 …]
|
/linux/drivers/infiniband/hw/mlx4/ |
A D | srq.c | 44 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() 334 if (unlikely(srq->head == srq->tail)) { in mlx4_ib_post_srq_recv() 340 srq->wrid[srq->head] = wr->wr_id; in mlx4_ib_post_srq_recv() 342 next = get_wqe(srq, srq->head); in mlx4_ib_post_srq_recv() [all …]
|
/linux/drivers/infiniband/hw/hns/ |
A D | hns_roce_srq.c | 19 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() 103 ret = xa_err(xa_store(&srq_table->xa, srq->srqn, srq, GFP_KERNEL)); in alloc_srqc() 152 ret, srq->srqn); in free_srqc() 253 srq->wrid = kvmalloc_array(srq->wqe_cnt, sizeof(u64), GFP_KERNEL); in alloc_srq_wrid() 254 if (!srq->wrid) in alloc_srq_wrid() 263 srq->wrid = NULL; in free_srq_wrid() 307 srq->max_gs = roundup_pow_of_two(attr->max_sge + srq->rsv_sge); in set_srq_basic_param() [all …]
|
/linux/drivers/infiniband/hw/mlx5/ |
A D | srq.c | 126 mlx5_init_fbc(srq->buf.frags, srq->msrq.wqe_shift, ilog2(srq->msrq.max), in create_srq_kernel() 129 srq->head = 0; in create_srq_kernel() 130 srq->tail = srq->msrq.max - 1; in create_srq_kernel() 152 srq->wq_sig = 0; in create_srq_kernel() 180 &srq->db); in destroy_srq_user() 291 srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn; in mlx5_ib_create_srq() 396 next = get_wqe(srq, srq->tail); in mlx5_ib_free_srq_wqe() 431 if (unlikely(srq->head == srq->tail)) { in mlx5_ib_post_srq_recv() 437 srq->wrid[srq->head] = wr->wr_id; in mlx5_ib_post_srq_recv() 439 next = get_wqe(srq, srq->head); in mlx5_ib_post_srq_recv() [all …]
|
A D | srq_cmd.c | 88 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 …]
|
A D | srq.h | 48 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,
|
/linux/drivers/infiniband/sw/rdmavt/ |
A D | srq.c | 58 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 …]
|
/linux/drivers/infiniband/sw/rxe/ |
A D | rxe_srq.c | 15 if (srq && srq->error) { in rxe_srq_chk_attr() 32 if (srq && srq->limit && (attr->max_wr < srq->limit)) { in rxe_srq_chk_attr() 34 attr->max_wr, srq->limit); in rxe_srq_chk_attr() 49 if (srq && (attr->srq_limit > srq->rq.queue->buf->index_mask)) { in rxe_srq_chk_attr() 52 srq->rq.queue->buf->index_mask); in rxe_srq_chk_attr() 85 srq->limit = init->attr.srq_limit; in rxe_srq_from_init() 86 srq->srq_num = srq->pelem.index; in rxe_srq_from_init() 103 srq->rq.queue = q; in rxe_srq_from_init() 141 &srq->rq.producer_lock, in rxe_srq_from_attr() 148 srq->limit = attr->srq_limit; in rxe_srq_from_attr() [all …]
|
A D | rxe_resp.c | 294 struct rxe_srq *srq = qp->srq; in get_srq_wqe() local 301 if (srq->error) in get_srq_wqe() 325 if (srq->limit && srq->ibsrq.event_handler && (count < srq->limit)) { in get_srq_wqe() 326 srq->limit = 0; in get_srq_wqe() 336 ev.element.srq = qp->ibqp.srq; in get_srq_wqe() 338 srq->ibsrq.event_handler(&ev, srq->ibsrq.srq_context); in get_srq_wqe() 345 struct rxe_srq *srq = qp->srq; in check_resource() local 377 if (srq) in check_resource() 919 if (!qp->srq) in do_complete() 1146 if (qp->srq) { in do_class_d1e_error() [all …]
|
A D | rxe_qp.c | 281 if (!qp->srq) { in rxe_qp_init_resp() 332 struct rxe_srq *srq = init->srq ? to_rsrq(init->srq) : NULL; in rxe_qp_from_init() local 337 if (srq) in rxe_qp_from_init() 338 rxe_add_ref(srq); in rxe_qp_from_init() 343 qp->srq = srq; in rxe_qp_from_init() 367 qp->srq = NULL; in rxe_qp_from_init() 369 if (srq) in rxe_qp_from_init() 385 init->srq = qp->ibqp.srq; in rxe_qp_to_init() 391 if (!qp->srq) { in rxe_qp_to_init() 750 if (!qp->srq) { in rxe_qp_to_attr() [all …]
|
A D | rxe_verbs.c | 310 srq->pd = pd; in rxe_create_srq() 320 rxe_drop_ref(srq); in rxe_create_srq() 361 if (srq->error) in rxe_query_srq() 365 attr->max_sge = srq->rq.max_sge; in rxe_query_srq() 366 attr->srq_limit = srq->limit; in rxe_query_srq() 374 if (srq->rq.queue) in rxe_destroy_srq() 375 rxe_queue_cleanup(srq->rq.queue); in rxe_destroy_srq() 377 rxe_drop_ref(srq->pd); in rxe_destroy_srq() 378 rxe_drop_ref(srq); in rxe_destroy_srq() 392 err = post_one_recv(&srq->rq, wr); in rxe_post_srq_recv() [all …]
|
/linux/drivers/infiniband/hw/vmw_pvrdma/ |
A D | pvrdma_srq.c | 137 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 …]
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
A D | srq.c | 46 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 …]
|
/linux/drivers/infiniband/hw/cxgb4/ |
A D | t4.h | 427 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 …]
|
A D | cq.c | 470 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 …]
|
A D | qp.c | 1347 __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() 2495 res->u.srq.srqid = cpu_to_be32(srq->idx); in free_srq_queue() 2607 res->u.srq.srqid = cpu_to_be32(srq->idx); in alloc_srq_queue() [all …]
|
/linux/drivers/infiniband/hw/bnxt_re/ |
A D | qplib_fp.c | 622 srq->swq = kcalloc(srq->hwq.max_elements, sizeof(*srq->swq), in bnxt_qplib_create_srq() 656 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_create_srq() 659 srq->dbinfo.hwq = &srq->hwq; in bnxt_qplib_create_srq() 660 srq->dbinfo.xid = srq->id; in bnxt_qplib_create_srq() 661 srq->dbinfo.db = srq->dpi->dbr; in bnxt_qplib_create_srq() 736 if (srq->start_idx == srq->last_idx) { in bnxt_qplib_post_srq_recv() 744 srq->start_idx = srq->swq[next].next_idx; in bnxt_qplib_post_srq_recv() 2428 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_release_srqe() 2469 srq = qp->srq; in bnxt_qplib_cq_process_res_rc() 2555 srq = qp->srq; in bnxt_qplib_cq_process_res_ud() [all …]
|
/linux/drivers/infiniband/sw/siw/ |
A D | siw_verbs.c | 399 if (attrs->srq) { in siw_create_qp() 405 qp->srq = to_siw_srq(attrs->srq); in siw_create_qp() 529 qp_init_attr->srq = base_qp->srq; in siw_query_qp() 1580 if (srq->limit) in siw_create_srq() 1586 srq->recvq = in siw_create_srq() 1589 srq->recvq = vzalloc(srq->num_rqe * sizeof(struct siw_rqe)); in siw_create_srq() 1599 srq->srq_entry = in siw_create_srq() 1624 if (srq->recvq) { in siw_create_srq() 1714 vfree(srq->recvq); in siw_destroy_srq() 1752 u32 idx = srq->rq_put % srq->num_rqe; in siw_post_srq_recv() [all …]
|
A D | siw_qp_rx.c | 338 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 …]
|
/linux/drivers/infiniband/hw/ocrdma/ |
A D | ocrdma_verbs.c | 1188 if (!srq) { in ocrdma_copy_qp_uresp() 1215 if (!srq) { in ocrdma_copy_qp_uresp() 1625 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() 1864 if (srq->pd->uctx) in ocrdma_destroy_srq() 1865 ocrdma_del_mmap(srq->pd->uctx, (u64) srq->rq.pa, in ocrdma_destroy_srq() [all …]
|
/linux/drivers/infiniband/core/ |
A D | uverbs_std_types_srq.c | 14 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()
|
A D | verbs.c | 1022 if (!srq) in ib_create_srq_user() 1026 srq->pd = pd; in ib_create_srq_user() 1050 if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd) in ib_create_srq_user() 1054 kfree(srq); in ib_create_srq_user() 1060 return srq; in ib_create_srq_user() 1089 ret = srq->device->ops.destroy_srq(srq, udata); in ib_destroy_srq_user() 1094 if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd) in ib_destroy_srq_user() 1099 kfree(srq); in ib_destroy_srq_user() 1226 qp->srq = attr->srq; in create_qp() 1313 if (qp->srq) in ib_qp_usecnt_inc() [all …]
|
A D | uverbs_std_types_qp.c | 93 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()
|
/linux/drivers/net/ |
A D | eql.c | 264 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() 437 s->priority = srq.priority; in eql_enslave() 438 s->priority_bps = srq.priority; in eql_enslave() 439 s->priority_Bps = srq.priority / 8; in eql_enslave() 459 slaving_request_t srq; in eql_emancipate() local 462 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t))) in eql_emancipate() [all …]
|
/linux/drivers/infiniband/hw/qedr/ |
A D | verbs.c | 1371 if (attrs->srq) in qedr_set_common_qp_params() 1372 qp->srq = get_qedr_srq(attrs->srq); in qedr_set_common_qp_params() 1448 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_free_srq_user_params() 1481 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_init_srq_user_params() 1483 DP_ERR(srq->dev, in qedr_init_srq_user_params() 1567 srq->dev = dev; in qedr_create_srq() 1631 rc = xa_insert_irq(&dev->srqs, srq->srq_id, srq, GFP_KERNEL); in qedr_create_srq() 1670 srq->srq_id); in qedr_destroy_srq() 1790 if (!qp->srq) { in qedr_iwarp_populate_user_qp() 2140 if (!qp->srq) { in qedr_cleanup_kernel() [all …]
|