srq              1307 drivers/infiniband/core/cm.c 		cm_req_set_srq(req_msg, param->srq);
srq              1711 drivers/infiniband/core/cm.c 	param->srq = cm_req_get_srq(req_msg);
srq              2078 drivers/infiniband/core/cm.c 		cm_rep_set_srq(rep_msg, param->srq);
srq              2224 drivers/infiniband/core/cm.c 	param->srq = cm_rep_get_srq(rep_msg);
srq               277 drivers/infiniband/core/cm_msgs.h static inline void cm_req_set_srq(struct cm_req_msg *req_msg, u8 srq)
srq               280 drivers/infiniband/core/cm_msgs.h 				  ((srq & 0x1) << 3));
srq               603 drivers/infiniband/core/cm_msgs.h static inline void cm_rep_set_srq(struct cm_rep_msg *rep_msg, u8 srq)
srq               606 drivers/infiniband/core/cm_msgs.h 				  ((srq & 0x1) << 4));
srq               975 drivers/infiniband/core/cma.c 	id_priv->srq = (qp->srq != NULL);
srq              1916 drivers/infiniband/core/cma.c 	event->param.conn.srq = rep_data->srq;
srq              2121 drivers/infiniband/core/cma.c 	event->param.conn.srq = req_data->srq;
srq              3857 drivers/infiniband/core/cma.c 	req.srq = id_priv->srq ? 1 : 0;
srq              3924 drivers/infiniband/core/cma.c 		id_priv->srq = conn_param->srq;
srq              3970 drivers/infiniband/core/cma.c 	rep.srq = id_priv->srq ? 1 : 0;
srq              4039 drivers/infiniband/core/cma.c 		id_priv->srq = conn_param->srq;
srq                85 drivers/infiniband/core/cma_priv.h 	u8			srq;
srq               347 drivers/infiniband/core/core_priv.h 	qp->srq = attr->srq;
srq               265 drivers/infiniband/core/ucma.c 	dst->srq = src->srq;
srq              1065 drivers/infiniband/core/ucma.c 	dst->srq = src->srq;
srq              1278 drivers/infiniband/core/uverbs_cmd.c 	struct ib_srq			*srq = NULL;
srq              1339 drivers/infiniband/core/uverbs_cmd.c 				srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ,
srq              1341 drivers/infiniband/core/uverbs_cmd.c 				if (!srq || srq->srq_type == IB_SRQT_XRC) {
srq              1379 drivers/infiniband/core/uverbs_cmd.c 	attr.srq           = srq;
srq              1439 drivers/infiniband/core/uverbs_cmd.c 		if (attr.srq)
srq              1440 drivers/infiniband/core/uverbs_cmd.c 			atomic_inc(&attr.srq->usecnt);
srq              1477 drivers/infiniband/core/uverbs_cmd.c 	if (srq)
srq              1478 drivers/infiniband/core/uverbs_cmd.c 		uobj_put_obj_read(srq);
srq              1495 drivers/infiniband/core/uverbs_cmd.c 	if (srq)
srq              1496 drivers/infiniband/core/uverbs_cmd.c 		uobj_put_obj_read(srq);
srq              2346 drivers/infiniband/core/uverbs_cmd.c 	struct ib_srq                      *srq;
srq              2359 drivers/infiniband/core/uverbs_cmd.c 	srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
srq              2360 drivers/infiniband/core/uverbs_cmd.c 	if (!srq) {
srq              2366 drivers/infiniband/core/uverbs_cmd.c 	ret = srq->device->ops.post_srq_recv(srq, wr, &bad_wr);
srq              2368 drivers/infiniband/core/uverbs_cmd.c 	uobj_put_obj_read(srq);
srq              3359 drivers/infiniband/core/uverbs_cmd.c 	struct ib_srq                   *srq;
srq              3416 drivers/infiniband/core/uverbs_cmd.c 	srq = rdma_zalloc_drv_obj(ib_dev, ib_srq);
srq              3417 drivers/infiniband/core/uverbs_cmd.c 	if (!srq) {
srq              3422 drivers/infiniband/core/uverbs_cmd.c 	srq->device        = pd->device;
srq              3423 drivers/infiniband/core/uverbs_cmd.c 	srq->pd            = pd;
srq              3424 drivers/infiniband/core/uverbs_cmd.c 	srq->srq_type	   = cmd->srq_type;
srq              3425 drivers/infiniband/core/uverbs_cmd.c 	srq->uobject       = &obj->uevent.uobject;
srq              3426 drivers/infiniband/core/uverbs_cmd.c 	srq->event_handler = attr.event_handler;
srq              3427 drivers/infiniband/core/uverbs_cmd.c 	srq->srq_context   = attr.srq_context;
srq              3429 drivers/infiniband/core/uverbs_cmd.c 	ret = pd->device->ops.create_srq(srq, &attr, udata);
srq              3434 drivers/infiniband/core/uverbs_cmd.c 		srq->ext.cq       = attr.ext.cq;
srq              3439 drivers/infiniband/core/uverbs_cmd.c 		srq->ext.xrc.xrcd = attr.ext.xrc.xrcd;
srq              3444 drivers/infiniband/core/uverbs_cmd.c 	atomic_set(&srq->usecnt, 0);
srq              3446 drivers/infiniband/core/uverbs_cmd.c 	obj->uevent.uobject.object = srq;
srq              3454 drivers/infiniband/core/uverbs_cmd.c 		resp.srqn = srq->ext.xrc.srq_num;
srq              3470 drivers/infiniband/core/uverbs_cmd.c 	ib_destroy_srq_user(srq, uverbs_get_cleared_udata(attrs));
srq              3472 drivers/infiniband/core/uverbs_cmd.c 	srq = NULL;
srq              3474 drivers/infiniband/core/uverbs_cmd.c 	kfree(srq);
srq              3530 drivers/infiniband/core/uverbs_cmd.c 	struct ib_srq              *srq;
srq              3538 drivers/infiniband/core/uverbs_cmd.c 	srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
srq              3539 drivers/infiniband/core/uverbs_cmd.c 	if (!srq)
srq              3545 drivers/infiniband/core/uverbs_cmd.c 	ret = srq->device->ops.modify_srq(srq, &attr, cmd.attr_mask,
srq              3548 drivers/infiniband/core/uverbs_cmd.c 	uobj_put_obj_read(srq);
srq              3558 drivers/infiniband/core/uverbs_cmd.c 	struct ib_srq                   *srq;
srq              3565 drivers/infiniband/core/uverbs_cmd.c 	srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
srq              3566 drivers/infiniband/core/uverbs_cmd.c 	if (!srq)
srq              3569 drivers/infiniband/core/uverbs_cmd.c 	ret = ib_query_srq(srq, &attr);
srq              3571 drivers/infiniband/core/uverbs_cmd.c 	uobj_put_obj_read(srq);
srq               526 drivers/infiniband/core/uverbs_main.c 	uobj = container_of(event->element.srq->uobject,
srq               149 drivers/infiniband/core/uverbs_std_types.c 	struct ib_srq *srq = uobject->object;
srq               152 drivers/infiniband/core/uverbs_std_types.c 	enum ib_srq_type  srq_type = srq->srq_type;
srq               155 drivers/infiniband/core/uverbs_std_types.c 	ret = ib_destroy_srq_user(srq, &attrs->driver_udata);
srq               970 drivers/infiniband/core/verbs.c 	struct ib_srq *srq;
srq               976 drivers/infiniband/core/verbs.c 	srq = rdma_zalloc_drv_obj(pd->device, ib_srq);
srq               977 drivers/infiniband/core/verbs.c 	if (!srq)
srq               980 drivers/infiniband/core/verbs.c 	srq->device = pd->device;
srq               981 drivers/infiniband/core/verbs.c 	srq->pd = pd;
srq               982 drivers/infiniband/core/verbs.c 	srq->event_handler = srq_init_attr->event_handler;
srq               983 drivers/infiniband/core/verbs.c 	srq->srq_context = srq_init_attr->srq_context;
srq               984 drivers/infiniband/core/verbs.c 	srq->srq_type = srq_init_attr->srq_type;
srq               986 drivers/infiniband/core/verbs.c 	if (ib_srq_has_cq(srq->srq_type)) {
srq               987 drivers/infiniband/core/verbs.c 		srq->ext.cq = srq_init_attr->ext.cq;
srq               988 drivers/infiniband/core/verbs.c 		atomic_inc(&srq->ext.cq->usecnt);
srq               990 drivers/infiniband/core/verbs.c 	if (srq->srq_type == IB_SRQT_XRC) {
srq               991 drivers/infiniband/core/verbs.c 		srq->ext.xrc.xrcd = srq_init_attr->ext.xrc.xrcd;
srq               992 drivers/infiniband/core/verbs.c 		atomic_inc(&srq->ext.xrc.xrcd->usecnt);
srq               996 drivers/infiniband/core/verbs.c 	ret = pd->device->ops.create_srq(srq, srq_init_attr, NULL);
srq               998 drivers/infiniband/core/verbs.c 		atomic_dec(&srq->pd->usecnt);
srq               999 drivers/infiniband/core/verbs.c 		if (srq->srq_type == IB_SRQT_XRC)
srq              1000 drivers/infiniband/core/verbs.c 			atomic_dec(&srq->ext.xrc.xrcd->usecnt);
srq              1001 drivers/infiniband/core/verbs.c 		if (ib_srq_has_cq(srq->srq_type))
srq              1002 drivers/infiniband/core/verbs.c 			atomic_dec(&srq->ext.cq->usecnt);
srq              1003 drivers/infiniband/core/verbs.c 		kfree(srq);
srq              1007 drivers/infiniband/core/verbs.c 	return srq;
srq              1011 drivers/infiniband/core/verbs.c int ib_modify_srq(struct ib_srq *srq,
srq              1015 drivers/infiniband/core/verbs.c 	return srq->device->ops.modify_srq ?
srq              1016 drivers/infiniband/core/verbs.c 		srq->device->ops.modify_srq(srq, srq_attr, srq_attr_mask,
srq              1021 drivers/infiniband/core/verbs.c int ib_query_srq(struct ib_srq *srq,
srq              1024 drivers/infiniband/core/verbs.c 	return srq->device->ops.query_srq ?
srq              1025 drivers/infiniband/core/verbs.c 		srq->device->ops.query_srq(srq, srq_attr) : -EOPNOTSUPP;
srq              1029 drivers/infiniband/core/verbs.c int ib_destroy_srq_user(struct ib_srq *srq, struct ib_udata *udata)
srq              1031 drivers/infiniband/core/verbs.c 	if (atomic_read(&srq->usecnt))
srq              1034 drivers/infiniband/core/verbs.c 	srq->device->ops.destroy_srq(srq, udata);
srq              1036 drivers/infiniband/core/verbs.c 	atomic_dec(&srq->pd->usecnt);
srq              1037 drivers/infiniband/core/verbs.c 	if (srq->srq_type == IB_SRQT_XRC)
srq              1038 drivers/infiniband/core/verbs.c 		atomic_dec(&srq->ext.xrc.xrcd->usecnt);
srq              1039 drivers/infiniband/core/verbs.c 	if (ib_srq_has_cq(srq->srq_type))
srq              1040 drivers/infiniband/core/verbs.c 		atomic_dec(&srq->ext.cq->usecnt);
srq              1041 drivers/infiniband/core/verbs.c 	kfree(srq);
srq              1134 drivers/infiniband/core/verbs.c 	qp->srq = NULL;
srq              1158 drivers/infiniband/core/verbs.c 	    qp_init_attr->srq || qp_init_attr->cap.max_recv_wr ||
srq              1198 drivers/infiniband/core/verbs.c 		qp->srq = NULL;
srq              1203 drivers/infiniband/core/verbs.c 		qp->srq = qp_init_attr->srq;
srq              1204 drivers/infiniband/core/verbs.c 		if (qp->srq)
srq              1205 drivers/infiniband/core/verbs.c 			atomic_inc(&qp_init_attr->srq->usecnt);
srq              1862 drivers/infiniband/core/verbs.c 	struct ib_srq *srq;
srq              1878 drivers/infiniband/core/verbs.c 	srq  = qp->srq;
srq              1901 drivers/infiniband/core/verbs.c 		if (srq)
srq              1902 drivers/infiniband/core/verbs.c 			atomic_dec(&srq->usecnt);
srq              2774 drivers/infiniband/core/verbs.c 	if (!qp->srq)
srq               868 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	if (!qp->qplib_qp.srq) {
srq              1010 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_srq *srq;
srq              1072 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	if (qp_init_attr->srq) {
srq              1073 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		srq = container_of(qp_init_attr->srq, struct bnxt_re_srq,
srq              1075 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		if (!srq) {
srq              1080 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		qp->qplib_qp.srq = &srq->qplib_srq;
srq              1293 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq,
srq              1295 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_dev *rdev = srq->rdev;
srq              1296 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_qplib_srq *qplib_srq = &srq->qplib_srq;
srq              1302 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	ib_umem_release(srq->umem);
srq              1310 drivers/infiniband/hw/bnxt_re/ib_verbs.c 				 struct bnxt_re_srq *srq,
srq              1314 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_qplib_srq *qplib_srq = &srq->qplib_srq;
srq              1329 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->umem = umem;
srq              1347 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_srq *srq =
srq              1363 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->rdev = rdev;
srq              1364 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->qplib_srq.pd = &pd->qplib_pd;
srq              1365 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->qplib_srq.dpi = &rdev->dpi_privileged;
srq              1373 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->qplib_srq.max_wqe = entries;
srq              1374 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->qplib_srq.max_sge = srq_init_attr->attr.max_sge;
srq              1375 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->qplib_srq.threshold = srq_init_attr->attr.srq_limit;
srq              1376 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->srq_limit = srq_init_attr->attr.srq_limit;
srq              1377 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq->qplib_srq.eventq_hw_ring_id = rdev->nq[0].ring_id;
srq              1381 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		rc = bnxt_re_init_user_srq(rdev, pd, srq, udata);
srq              1386 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	rc = bnxt_qplib_create_srq(&rdev->qplib_res, &srq->qplib_srq);
srq              1395 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		resp.srqid = srq->qplib_srq.id;
srq              1400 drivers/infiniband/hw/bnxt_re/ib_verbs.c 					       &srq->qplib_srq);
srq              1411 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	ib_umem_release(srq->umem);
srq              1420 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq,
srq              1422 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_dev *rdev = srq->rdev;
srq              1431 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		if (srq_attr->srq_limit > srq->qplib_srq.max_wqe)
srq              1434 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		srq->qplib_srq.threshold = srq_attr->srq_limit;
srq              1435 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		rc = bnxt_qplib_modify_srq(&rdev->qplib_res, &srq->qplib_srq);
srq              1441 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		srq->srq_limit = srq_attr->srq_limit;
srq              1454 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq,
srq              1457 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_dev *rdev = srq->rdev;
srq              1461 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	tsrq.qplib_srq.id = srq->qplib_srq.id;
srq              1467 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq_attr->max_wr = srq->qplib_srq.max_wqe;
srq              1468 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	srq_attr->max_sge = srq->qplib_srq.max_sge;
srq              1477 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq,
srq              1483 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	spin_lock_irqsave(&srq->lock, flags);
srq              1491 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		rc = bnxt_qplib_post_srq_recv(&srq->qplib_srq, &wqe);
srq              1498 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq               171 drivers/infiniband/hw/bnxt_re/ib_verbs.h int bnxt_re_create_srq(struct ib_srq *srq,
srq               174 drivers/infiniband/hw/bnxt_re/ib_verbs.h int bnxt_re_modify_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr,
srq               177 drivers/infiniband/hw/bnxt_re/ib_verbs.h int bnxt_re_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
srq               178 drivers/infiniband/hw/bnxt_re/ib_verbs.h void bnxt_re_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
srq               179 drivers/infiniband/hw/bnxt_re/ib_verbs.h int bnxt_re_post_srq_recv(struct ib_srq *srq, const struct ib_recv_wr *recv_wr,
srq               799 drivers/infiniband/hw/bnxt_re/main.c 	if (qp->qplib_qp.srq) {
srq               853 drivers/infiniband/hw/bnxt_re/main.c 	struct bnxt_re_srq *srq = container_of(handle, struct bnxt_re_srq,
srq               858 drivers/infiniband/hw/bnxt_re/main.c 	if (!srq) {
srq               864 drivers/infiniband/hw/bnxt_re/main.c 	ib_event.device = &srq->rdev->ibdev;
srq               865 drivers/infiniband/hw/bnxt_re/main.c 	ib_event.element.srq = &srq->ib_srq;
srq               871 drivers/infiniband/hw/bnxt_re/main.c 	if (srq->ib_srq.event_handler) {
srq               873 drivers/infiniband/hw/bnxt_re/main.c 		(*srq->ib_srq.event_handler)(&ib_event,
srq               874 drivers/infiniband/hw/bnxt_re/main.c 					     srq->ib_srq.srq_context);
srq                58 drivers/infiniband/hw/bnxt_re/qplib_fp.c static void bnxt_qplib_arm_srq(struct bnxt_qplib_srq *srq, u32 arm_type);
srq                82 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (!qp->srq) {
srq               129 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (!qp->srq) {
srq               492 drivers/infiniband/hw/bnxt_re/qplib_fp.c static void bnxt_qplib_arm_srq(struct bnxt_qplib_srq *srq, u32 arm_type)
srq               494 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	struct bnxt_qplib_hwq *srq_hwq = &srq->hwq;
srq               501 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		   srq->threshold : HWQ_CMP(srq_hwq->prod, srq_hwq);
srq               502 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	db = (arm_type == DBC_DBC_TYPE_SRQ_ARMENA) ? srq->dbr_base :
srq               503 drivers/infiniband/hw/bnxt_re/qplib_fp.c 						     srq->dpi->dbr;
srq               504 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	val = ((srq->id << DBC_DBC_XID_SFT) & DBC_DBC_XID_MASK) | arm_type;
srq               511 drivers/infiniband/hw/bnxt_re/qplib_fp.c 			   struct bnxt_qplib_srq *srq)
srq               522 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.srq_cid = cpu_to_le32(srq->id);
srq               526 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	kfree(srq->swq);
srq               529 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	bnxt_qplib_free_hwq(res->pdev, &srq->hwq);
srq               533 drivers/infiniband/hw/bnxt_re/qplib_fp.c 			  struct bnxt_qplib_srq *srq)
srq               542 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->hwq.max_elements = srq->max_wqe;
srq               543 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	rc = bnxt_qplib_alloc_init_hwq(res->pdev, &srq->hwq, &srq->sg_info,
srq               544 drivers/infiniband/hw/bnxt_re/qplib_fp.c 				       &srq->hwq.max_elements,
srq               550 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->swq = kcalloc(srq->hwq.max_elements, sizeof(*srq->swq),
srq               552 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (!srq->swq) {
srq               560 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.dpi = cpu_to_le32(srq->dpi->dpi);
srq               561 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.srq_handle = cpu_to_le64((uintptr_t)srq);
srq               563 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.srq_size = cpu_to_le16((u16)srq->hwq.max_elements);
srq               564 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	pbl = &srq->hwq.pbl[PBL_LVL_0];
srq               565 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.pg_size_lvl = cpu_to_le16((((u16)srq->hwq.level &
srq               582 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.pd_id = cpu_to_le32(srq->pd->id);
srq               583 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.eventq_id = cpu_to_le16(srq->eventq_hw_ring_id);
srq               590 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	spin_lock_init(&srq->lock);
srq               591 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->start_idx = 0;
srq               592 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->last_idx = srq->hwq.max_elements - 1;
srq               593 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	for (idx = 0; idx < srq->hwq.max_elements; idx++)
srq               594 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq->swq[idx].next_idx = idx + 1;
srq               595 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->swq[srq->last_idx].next_idx = -1;
srq               597 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->id = le32_to_cpu(resp.xid);
srq               598 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->dbr_base = res->dpi_tbl.dbr_bar_reg_iomem;
srq               599 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (srq->threshold)
srq               600 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		bnxt_qplib_arm_srq(srq, DBC_DBC_TYPE_SRQ_ARMENA);
srq               601 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->arm_req = false;
srq               605 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	bnxt_qplib_free_hwq(res->pdev, &srq->hwq);
srq               606 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	kfree(srq->swq);
srq               612 drivers/infiniband/hw/bnxt_re/qplib_fp.c 			  struct bnxt_qplib_srq *srq)
srq               614 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	struct bnxt_qplib_hwq *srq_hwq = &srq->hwq;
srq               622 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (count > srq->threshold) {
srq               623 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq->arm_req = false;
srq               624 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		bnxt_qplib_arm_srq(srq, DBC_DBC_TYPE_SRQ_ARM);
srq               627 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq->arm_req = true;
srq               634 drivers/infiniband/hw/bnxt_re/qplib_fp.c 			 struct bnxt_qplib_srq *srq)
srq               645 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	req.srq_cid = cpu_to_le32(srq->id);
srq               654 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->threshold = le16_to_cpu(sb->srq_limit);
srq               660 drivers/infiniband/hw/bnxt_re/qplib_fp.c int bnxt_qplib_post_srq_recv(struct bnxt_qplib_srq *srq,
srq               663 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	struct bnxt_qplib_hwq *srq_hwq = &srq->hwq;
srq               670 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (srq->start_idx == srq->last_idx) {
srq               672 drivers/infiniband/hw/bnxt_re/qplib_fp.c 			"FP: SRQ (0x%x) is full!\n", srq->id);
srq               677 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	next = srq->start_idx;
srq               678 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->start_idx = srq->swq[next].next_idx;
srq               697 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->swq[next].wr_id = wqe->wr_id;
srq               712 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	bnxt_qplib_arm_srq(srq, DBC_DBC_TYPE_SRQ);
srq               713 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	if (srq->arm_req == true && count > srq->threshold) {
srq               714 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq->arm_req = false;
srq               715 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		bnxt_qplib_arm_srq(srq, DBC_DBC_TYPE_SRQ_ARM);
srq               994 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (qp->srq) {
srq               996 drivers/infiniband/hw/bnxt_re/qplib_fp.c 			req.srq_cid = cpu_to_le32(qp->srq->id);
srq              2319 drivers/infiniband/hw/bnxt_re/qplib_fp.c static void bnxt_qplib_release_srqe(struct bnxt_qplib_srq *srq, u32 tag)
srq              2321 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	spin_lock(&srq->hwq.lock);
srq              2322 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->swq[srq->last_idx].next_idx = (int)tag;
srq              2323 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->last_idx = (int)tag;
srq              2324 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->swq[srq->last_idx].next_idx = -1;
srq              2325 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	srq->hwq.cons++; /* Support for SRQE counter */
srq              2326 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	spin_unlock(&srq->hwq.lock);
srq              2336 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	struct bnxt_qplib_srq *srq;
srq              2365 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq = qp->srq;
srq              2366 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (!srq)
srq              2368 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (wr_id_idx >= srq->hwq.max_elements) {
srq              2371 drivers/infiniband/hw/bnxt_re/qplib_fp.c 				wr_id_idx, srq->hwq.max_elements);
srq              2374 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		cqe->wr_id = srq->swq[wr_id_idx].wr_id;
srq              2375 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		bnxt_qplib_release_srqe(srq, wr_id_idx);
srq              2411 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	struct bnxt_qplib_srq *srq;
srq              2445 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq = qp->srq;
srq              2446 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (!srq)
srq              2449 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (wr_id_idx >= srq->hwq.max_elements) {
srq              2452 drivers/infiniband/hw/bnxt_re/qplib_fp.c 				wr_id_idx, srq->hwq.max_elements);
srq              2455 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		cqe->wr_id = srq->swq[wr_id_idx].wr_id;
srq              2456 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		bnxt_qplib_release_srqe(srq, wr_id_idx);
srq              2508 drivers/infiniband/hw/bnxt_re/qplib_fp.c 	struct bnxt_qplib_srq *srq;
srq              2547 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		srq = qp->srq;
srq              2548 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (!srq) {
srq              2553 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		if (wr_id_idx >= srq->hwq.max_elements) {
srq              2556 drivers/infiniband/hw/bnxt_re/qplib_fp.c 				wr_id_idx, srq->hwq.max_elements);
srq              2559 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		cqe->wr_id = srq->swq[wr_id_idx].wr_id;
srq              2560 drivers/infiniband/hw/bnxt_re/qplib_fp.c 		bnxt_qplib_release_srqe(srq, wr_id_idx);
srq               292 drivers/infiniband/hw/bnxt_re/qplib_fp.h 	struct bnxt_qplib_srq		*srq;
srq               492 drivers/infiniband/hw/bnxt_re/qplib_fp.h 						struct bnxt_qplib_srq *srq,
srq               513 drivers/infiniband/hw/bnxt_re/qplib_fp.h 					     struct bnxt_qplib_srq *srq,
srq               516 drivers/infiniband/hw/bnxt_re/qplib_fp.h 			  struct bnxt_qplib_srq *srq);
srq               518 drivers/infiniband/hw/bnxt_re/qplib_fp.h 			  struct bnxt_qplib_srq *srq);
srq               520 drivers/infiniband/hw/bnxt_re/qplib_fp.h 			 struct bnxt_qplib_srq *srq);
srq               522 drivers/infiniband/hw/bnxt_re/qplib_fp.h 			    struct bnxt_qplib_srq *srq);
srq               523 drivers/infiniband/hw/bnxt_re/qplib_fp.h int bnxt_qplib_post_srq_recv(struct bnxt_qplib_srq *srq,
srq               704 drivers/infiniband/hw/cxgb4/cm.c 	if (!ep->com.qp || !ep->com.qp->srq) {
srq              1931 drivers/infiniband/hw/cxgb4/cm.c 	if (ep->com.qp && ep->com.qp->srq) {
srq              2890 drivers/infiniband/hw/cxgb4/cm.c 		if (ep->com.qp && ep->com.qp->srq) {
srq               462 drivers/infiniband/hw/cxgb4/cq.c static void post_pending_srq_wrs(struct t4_srq *srq)
srq               467 drivers/infiniband/hw/cxgb4/cq.c 	while (srq->pending_in_use) {
srq               468 drivers/infiniband/hw/cxgb4/cq.c 		pwr = &srq->pending_wrs[srq->pending_cidx];
srq               469 drivers/infiniband/hw/cxgb4/cq.c 		srq->sw_rq[srq->pidx].wr_id = pwr->wr_id;
srq               470 drivers/infiniband/hw/cxgb4/cq.c 		srq->sw_rq[srq->pidx].valid = 1;
srq               474 drivers/infiniband/hw/cxgb4/cq.c 			 srq->cidx, srq->pidx, srq->wq_pidx,
srq               475 drivers/infiniband/hw/cxgb4/cq.c 			 srq->in_use, srq->size,
srq               478 drivers/infiniband/hw/cxgb4/cq.c 		c4iw_copy_wr_to_srq(srq, &pwr->wqe, pwr->len16);
srq               479 drivers/infiniband/hw/cxgb4/cq.c 		t4_srq_consume_pending_wr(srq);
srq               480 drivers/infiniband/hw/cxgb4/cq.c 		t4_srq_produce(srq, pwr->len16);
srq               485 drivers/infiniband/hw/cxgb4/cq.c 		t4_ring_srq_db(srq, idx, pwr->len16, &pwr->wqe);
srq               486 drivers/infiniband/hw/cxgb4/cq.c 		srq->queue[srq->size].status.host_wq_pidx =
srq               487 drivers/infiniband/hw/cxgb4/cq.c 			srq->wq_pidx;
srq               491 drivers/infiniband/hw/cxgb4/cq.c static u64 reap_srq_cqe(struct t4_cqe *hw_cqe, struct t4_srq *srq)
srq               493 drivers/infiniband/hw/cxgb4/cq.c 	int rel_idx = CQE_ABS_RQE_IDX(hw_cqe) - srq->rqt_abs_idx;
srq               496 drivers/infiniband/hw/cxgb4/cq.c 	srq->sw_rq[rel_idx].valid = 0;
srq               497 drivers/infiniband/hw/cxgb4/cq.c 	wr_id = srq->sw_rq[rel_idx].wr_id;
srq               499 drivers/infiniband/hw/cxgb4/cq.c 	if (rel_idx == srq->cidx) {
srq               501 drivers/infiniband/hw/cxgb4/cq.c 			 __func__, rel_idx, srq->cidx, srq->pidx,
srq               502 drivers/infiniband/hw/cxgb4/cq.c 			 srq->wq_pidx, srq->in_use, srq->size,
srq               503 drivers/infiniband/hw/cxgb4/cq.c 			 (unsigned long long)srq->sw_rq[rel_idx].wr_id);
srq               504 drivers/infiniband/hw/cxgb4/cq.c 		t4_srq_consume(srq);
srq               505 drivers/infiniband/hw/cxgb4/cq.c 		while (srq->ooo_count && !srq->sw_rq[srq->cidx].valid) {
srq               507 drivers/infiniband/hw/cxgb4/cq.c 				 __func__, srq->cidx, srq->pidx,
srq               508 drivers/infiniband/hw/cxgb4/cq.c 				 srq->wq_pidx, srq->in_use,
srq               509 drivers/infiniband/hw/cxgb4/cq.c 				 srq->size, srq->ooo_count,
srq               511 drivers/infiniband/hw/cxgb4/cq.c 				 srq->sw_rq[srq->cidx].wr_id);
srq               512 drivers/infiniband/hw/cxgb4/cq.c 			t4_srq_consume_ooo(srq);
srq               514 drivers/infiniband/hw/cxgb4/cq.c 		if (srq->ooo_count == 0 && srq->pending_in_use)
srq               515 drivers/infiniband/hw/cxgb4/cq.c 			post_pending_srq_wrs(srq);
srq               518 drivers/infiniband/hw/cxgb4/cq.c 			 __func__, rel_idx, srq->cidx,
srq               519 drivers/infiniband/hw/cxgb4/cq.c 			 srq->pidx, srq->wq_pidx,
srq               520 drivers/infiniband/hw/cxgb4/cq.c 			 srq->in_use, srq->size,
srq               521 drivers/infiniband/hw/cxgb4/cq.c 			 srq->ooo_count,
srq               522 drivers/infiniband/hw/cxgb4/cq.c 			 (unsigned long long)srq->sw_rq[rel_idx].wr_id);
srq               523 drivers/infiniband/hw/cxgb4/cq.c 		t4_srq_produce_ooo(srq);
srq               546 drivers/infiniband/hw/cxgb4/cq.c 		   struct t4_srq *srq)
srq               722 drivers/infiniband/hw/cxgb4/cq.c 		if (!srq) {
srq               729 drivers/infiniband/hw/cxgb4/cq.c 			*cookie = reap_srq_cqe(hw_cqe, srq);
srq               755 drivers/infiniband/hw/cxgb4/cq.c 			      struct ib_wc *wc, struct c4iw_srq *srq)
srq               765 drivers/infiniband/hw/cxgb4/cq.c 		      srq ? &srq->wq : NULL);
srq               777 drivers/infiniband/hw/cxgb4/cq.c 	if (srq && !(srq->flags & T4_SRQ_LIMIT_SUPPORT) && srq->armed &&
srq               778 drivers/infiniband/hw/cxgb4/cq.c 	    srq->wq.in_use < srq->srq_limit)
srq               779 drivers/infiniband/hw/cxgb4/cq.c 		c4iw_dispatch_srq_limit_reached_event(srq);
srq               923 drivers/infiniband/hw/cxgb4/cq.c 	struct c4iw_srq *srq = NULL;
srq               936 drivers/infiniband/hw/cxgb4/cq.c 		srq = qhp->srq;
srq               937 drivers/infiniband/hw/cxgb4/cq.c 		if (srq)
srq               938 drivers/infiniband/hw/cxgb4/cq.c 			spin_lock(&srq->lock);
srq               939 drivers/infiniband/hw/cxgb4/cq.c 		ret = __c4iw_poll_cq_one(chp, qhp, wc, srq);
srq               941 drivers/infiniband/hw/cxgb4/cq.c 		if (srq)
srq               942 drivers/infiniband/hw/cxgb4/cq.c 			spin_unlock(&srq->lock);
srq               271 drivers/infiniband/hw/cxgb4/device.c 				      qp->wq.sq.qid, qp->srq ? "srq" : "rq",
srq               272 drivers/infiniband/hw/cxgb4/device.c 				      qp->srq ? qp->srq->idx : qp->wq.rq.qid,
srq               833 drivers/infiniband/hw/cxgb4/device.c 		 rdev->lldi.vr->srq.size);
srq               846 drivers/infiniband/hw/cxgb4/device.c 	rdev->stats.srqt.total = rdev->lldi.vr->srq.size;
srq               851 drivers/infiniband/hw/cxgb4/device.c 				 T4_MAX_NUM_PD, rdev->lldi.vr->srq.size);
srq               135 drivers/infiniband/hw/cxgb4/iw_cxgb4.h 	struct c4iw_stat srq;
srq               495 drivers/infiniband/hw/cxgb4/iw_cxgb4.h 	struct c4iw_srq *srq;
srq              1003 drivers/infiniband/hw/cxgb4/iw_cxgb4.h int c4iw_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *attrs,
srq              1049 drivers/infiniband/hw/cxgb4/iw_cxgb4.h void c4iw_dispatch_srq_limit_reached_event(struct c4iw_srq *srq);
srq              1050 drivers/infiniband/hw/cxgb4/iw_cxgb4.h void c4iw_copy_wr_to_srq(struct t4_srq *srq, union t4_recv_wr *wqe, u8 len16);
srq               283 drivers/infiniband/hw/cxgb4/provider.c 	props->max_srq = dev->rdev.lldi.vr->srq.size;
srq              1340 drivers/infiniband/hw/cxgb4/qp.c static void defer_srq_wr(struct t4_srq *srq, union t4_recv_wr *wqe,
srq              1343 drivers/infiniband/hw/cxgb4/qp.c 	struct t4_srq_pending_wr *pwr = &srq->pending_wrs[srq->pending_pidx];
srq              1346 drivers/infiniband/hw/cxgb4/qp.c 		 __func__, srq->cidx, srq->pidx, srq->wq_pidx,
srq              1347 drivers/infiniband/hw/cxgb4/qp.c 		 srq->in_use, srq->ooo_count,
srq              1348 drivers/infiniband/hw/cxgb4/qp.c 		 (unsigned long long)wr_id, srq->pending_cidx,
srq              1349 drivers/infiniband/hw/cxgb4/qp.c 		 srq->pending_pidx, srq->pending_in_use);
srq              1353 drivers/infiniband/hw/cxgb4/qp.c 	t4_srq_produce_pending_wr(srq);
srq              1360 drivers/infiniband/hw/cxgb4/qp.c 	struct c4iw_srq *srq;
srq              1367 drivers/infiniband/hw/cxgb4/qp.c 	srq = to_c4iw_srq(ibsrq);
srq              1368 drivers/infiniband/hw/cxgb4/qp.c 	spin_lock_irqsave(&srq->lock, flag);
srq              1369 drivers/infiniband/hw/cxgb4/qp.c 	num_wrs = t4_srq_avail(&srq->wq);
srq              1371 drivers/infiniband/hw/cxgb4/qp.c 		spin_unlock_irqrestore(&srq->lock, flag);
srq              1392 drivers/infiniband/hw/cxgb4/qp.c 		wqe->recv.wrid = srq->wq.pidx;
srq              1398 drivers/infiniband/hw/cxgb4/qp.c 		if (srq->wq.ooo_count ||
srq              1399 drivers/infiniband/hw/cxgb4/qp.c 		    srq->wq.pending_in_use ||
srq              1400 drivers/infiniband/hw/cxgb4/qp.c 		    srq->wq.sw_rq[srq->wq.pidx].valid) {
srq              1401 drivers/infiniband/hw/cxgb4/qp.c 			defer_srq_wr(&srq->wq, wqe, wr->wr_id, len16);
srq              1403 drivers/infiniband/hw/cxgb4/qp.c 			srq->wq.sw_rq[srq->wq.pidx].wr_id = wr->wr_id;
srq              1404 drivers/infiniband/hw/cxgb4/qp.c 			srq->wq.sw_rq[srq->wq.pidx].valid = 1;
srq              1405 drivers/infiniband/hw/cxgb4/qp.c 			c4iw_copy_wr_to_srq(&srq->wq, wqe, len16);
srq              1407 drivers/infiniband/hw/cxgb4/qp.c 				 __func__, srq->wq.cidx,
srq              1408 drivers/infiniband/hw/cxgb4/qp.c 				 srq->wq.pidx, srq->wq.wq_pidx,
srq              1409 drivers/infiniband/hw/cxgb4/qp.c 				 srq->wq.in_use,
srq              1411 drivers/infiniband/hw/cxgb4/qp.c 			t4_srq_produce(&srq->wq, len16);
srq              1418 drivers/infiniband/hw/cxgb4/qp.c 		t4_ring_srq_db(&srq->wq, idx, len16, wqe);
srq              1419 drivers/infiniband/hw/cxgb4/qp.c 	spin_unlock_irqrestore(&srq->lock, flag);
srq              1621 drivers/infiniband/hw/cxgb4/qp.c 	if (!qhp->srq) {
srq              1802 drivers/infiniband/hw/cxgb4/qp.c 	if (qhp->srq) {
srq              1804 drivers/infiniband/hw/cxgb4/qp.c 						  qhp->srq->idx);
srq              2103 drivers/infiniband/hw/cxgb4/qp.c 		   ucontext ? &ucontext->uctx : &rhp->rdev.uctx, !qhp->srq);
srq              2142 drivers/infiniband/hw/cxgb4/qp.c 	if (!attrs->srq) {
srq              2171 drivers/infiniband/hw/cxgb4/qp.c 	if (!attrs->srq) {
srq              2180 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq)
srq              2187 drivers/infiniband/hw/cxgb4/qp.c 			qhp->wr_waitp, !attrs->srq);
srq              2202 drivers/infiniband/hw/cxgb4/qp.c 	if (!attrs->srq) {
srq              2230 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2242 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2266 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2278 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2284 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2296 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2306 drivers/infiniband/hw/cxgb4/qp.c 		if (!attrs->srq) {
srq              2324 drivers/infiniband/hw/cxgb4/qp.c 	if (!attrs->srq) {
srq              2335 drivers/infiniband/hw/cxgb4/qp.c 	if (attrs->srq)
srq              2336 drivers/infiniband/hw/cxgb4/qp.c 		qhp->srq = to_c4iw_srq(attrs->srq);
srq              2346 drivers/infiniband/hw/cxgb4/qp.c 	if (!attrs->srq)
srq              2351 drivers/infiniband/hw/cxgb4/qp.c 	if (!attrs->srq)
srq              2359 drivers/infiniband/hw/cxgb4/qp.c 		   ucontext ? &ucontext->uctx : &rhp->rdev.uctx, !attrs->srq);
srq              2424 drivers/infiniband/hw/cxgb4/qp.c void c4iw_dispatch_srq_limit_reached_event(struct c4iw_srq *srq)
srq              2428 drivers/infiniband/hw/cxgb4/qp.c 	event.device = &srq->rhp->ibdev;
srq              2429 drivers/infiniband/hw/cxgb4/qp.c 	event.element.srq = &srq->ibsrq;
srq              2438 drivers/infiniband/hw/cxgb4/qp.c 	struct c4iw_srq *srq = to_c4iw_srq(ib_srq);
srq              2445 drivers/infiniband/hw/cxgb4/qp.c 		c4iw_dispatch_srq_limit_reached_event(srq);
srq              2456 drivers/infiniband/hw/cxgb4/qp.c 		srq->armed = true;
srq              2457 drivers/infiniband/hw/cxgb4/qp.c 		srq->srq_limit = attr->srq_limit;
srq              2480 drivers/infiniband/hw/cxgb4/qp.c static void free_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx,
srq              2483 drivers/infiniband/hw/cxgb4/qp.c 	struct c4iw_rdev *rdev = &srq->rhp->rdev;
srq              2484 drivers/infiniband/hw/cxgb4/qp.c 	struct sk_buff *skb = srq->destroy_skb;
srq              2485 drivers/infiniband/hw/cxgb4/qp.c 	struct t4_srq *wq = &srq->wq;
srq              2501 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.restype = FW_RI_RES_TYPE_SRQ;
srq              2502 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.op = FW_RI_RES_OP_RESET;
srq              2503 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.srqid = cpu_to_be32(srq->idx);
srq              2504 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.eqid = cpu_to_be32(wq->qid);
srq              2517 drivers/infiniband/hw/cxgb4/qp.c static int alloc_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx,
srq              2520 drivers/infiniband/hw/cxgb4/qp.c 	struct c4iw_rdev *rdev = &srq->rhp->rdev;
srq              2522 drivers/infiniband/hw/cxgb4/qp.c 	struct t4_srq *wq = &srq->wq;
srq              2539 drivers/infiniband/hw/cxgb4/qp.c 		wq->pending_wrs = kcalloc(srq->wq.size,
srq              2540 drivers/infiniband/hw/cxgb4/qp.c 					  sizeof(*srq->wq.pending_wrs),
srq              2591 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.restype = FW_RI_RES_TYPE_SRQ;
srq              2592 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.op = FW_RI_RES_OP_WRITE;
srq              2599 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.eqid = cpu_to_be32(wq->qid);
srq              2600 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.fetchszm_to_iqid =
srq              2606 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.dcaen_to_eqsize =
srq              2614 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.eqaddr = cpu_to_be64(wq->dma_addr);
srq              2615 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.srqid = cpu_to_be32(srq->idx);
srq              2616 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.pdid = cpu_to_be32(srq->pdid);
srq              2617 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.hwsrqsize = cpu_to_be32(wq->rqt_size);
srq              2618 drivers/infiniband/hw/cxgb4/qp.c 	res->u.srq.hwsrqaddr = cpu_to_be32(wq->rqt_hwaddr -
srq              2629 drivers/infiniband/hw/cxgb4/qp.c 			__func__, srq->idx, wq->qid, srq->pdid, wq->queue,
srq              2652 drivers/infiniband/hw/cxgb4/qp.c void c4iw_copy_wr_to_srq(struct t4_srq *srq, union t4_recv_wr *wqe, u8 len16)
srq              2657 drivers/infiniband/hw/cxgb4/qp.c 	dst = (u64 *)((u8 *)srq->queue + srq->wq_pidx * T4_EQ_ENTRY_SIZE);
srq              2660 drivers/infiniband/hw/cxgb4/qp.c 		if (dst >= (u64 *)&srq->queue[srq->size])
srq              2661 drivers/infiniband/hw/cxgb4/qp.c 			dst = (u64 *)srq->queue;
srq              2663 drivers/infiniband/hw/cxgb4/qp.c 		if (dst >= (u64 *)&srq->queue[srq->size])
srq              2664 drivers/infiniband/hw/cxgb4/qp.c 			dst = (u64 *)srq->queue;
srq              2674 drivers/infiniband/hw/cxgb4/qp.c 	struct c4iw_srq *srq = to_c4iw_srq(ib_srq);
srq              2688 drivers/infiniband/hw/cxgb4/qp.c 	if (!rhp->rdev.lldi.vr->srq.size)
srq              2704 drivers/infiniband/hw/cxgb4/qp.c 	srq->wr_waitp = c4iw_alloc_wr_wait(GFP_KERNEL);
srq              2705 drivers/infiniband/hw/cxgb4/qp.c 	if (!srq->wr_waitp)
srq              2708 drivers/infiniband/hw/cxgb4/qp.c 	srq->idx = c4iw_alloc_srq_idx(&rhp->rdev);
srq              2709 drivers/infiniband/hw/cxgb4/qp.c 	if (srq->idx < 0) {
srq              2715 drivers/infiniband/hw/cxgb4/qp.c 	srq->destroy_skb = alloc_skb(wr_len, GFP_KERNEL);
srq              2716 drivers/infiniband/hw/cxgb4/qp.c 	if (!srq->destroy_skb) {
srq              2721 drivers/infiniband/hw/cxgb4/qp.c 	srq->rhp = rhp;
srq              2722 drivers/infiniband/hw/cxgb4/qp.c 	srq->pdid = php->pdid;
srq              2724 drivers/infiniband/hw/cxgb4/qp.c 	srq->wq.size = rqsize;
srq              2725 drivers/infiniband/hw/cxgb4/qp.c 	srq->wq.memsize =
srq              2727 drivers/infiniband/hw/cxgb4/qp.c 		sizeof(*srq->wq.queue);
srq              2729 drivers/infiniband/hw/cxgb4/qp.c 		srq->wq.memsize = roundup(srq->wq.memsize, PAGE_SIZE);
srq              2731 drivers/infiniband/hw/cxgb4/qp.c 	ret = alloc_srq_queue(srq, ucontext ? &ucontext->uctx :
srq              2732 drivers/infiniband/hw/cxgb4/qp.c 			&rhp->rdev.uctx, srq->wr_waitp);
srq              2738 drivers/infiniband/hw/cxgb4/qp.c 		srq->flags = T4_SRQ_LIMIT_SUPPORT;
srq              2752 drivers/infiniband/hw/cxgb4/qp.c 		uresp.flags = srq->flags;
srq              2754 drivers/infiniband/hw/cxgb4/qp.c 		uresp.srqid = srq->wq.qid;
srq              2755 drivers/infiniband/hw/cxgb4/qp.c 		uresp.srq_size = srq->wq.size;
srq              2756 drivers/infiniband/hw/cxgb4/qp.c 		uresp.srq_memsize = srq->wq.memsize;
srq              2757 drivers/infiniband/hw/cxgb4/qp.c 		uresp.rqt_abs_idx = srq->wq.rqt_abs_idx;
srq              2768 drivers/infiniband/hw/cxgb4/qp.c 		srq_key_mm->addr = virt_to_phys(srq->wq.queue);
srq              2769 drivers/infiniband/hw/cxgb4/qp.c 		srq_key_mm->len = PAGE_ALIGN(srq->wq.memsize);
srq              2772 drivers/infiniband/hw/cxgb4/qp.c 		srq_db_key_mm->addr = (u64)(unsigned long)srq->wq.bar2_pa;
srq              2778 drivers/infiniband/hw/cxgb4/qp.c 		 __func__, srq->wq.qid, srq->idx, srq->wq.size,
srq              2779 drivers/infiniband/hw/cxgb4/qp.c 			(unsigned long)srq->wq.memsize, attrs->attr.max_wr);
srq              2781 drivers/infiniband/hw/cxgb4/qp.c 	spin_lock_init(&srq->lock);
srq              2789 drivers/infiniband/hw/cxgb4/qp.c 	free_srq_queue(srq, ucontext ? &ucontext->uctx : &rhp->rdev.uctx,
srq              2790 drivers/infiniband/hw/cxgb4/qp.c 		       srq->wr_waitp);
srq              2792 drivers/infiniband/hw/cxgb4/qp.c 	kfree_skb(srq->destroy_skb);
srq              2794 drivers/infiniband/hw/cxgb4/qp.c 	c4iw_free_srq_idx(&rhp->rdev, srq->idx);
srq              2796 drivers/infiniband/hw/cxgb4/qp.c 	c4iw_put_wr_wait(srq->wr_waitp);
srq              2803 drivers/infiniband/hw/cxgb4/qp.c 	struct c4iw_srq *srq;
srq              2806 drivers/infiniband/hw/cxgb4/qp.c 	srq = to_c4iw_srq(ibsrq);
srq              2807 drivers/infiniband/hw/cxgb4/qp.c 	rhp = srq->rhp;
srq              2809 drivers/infiniband/hw/cxgb4/qp.c 	pr_debug("%s id %d\n", __func__, srq->wq.qid);
srq              2812 drivers/infiniband/hw/cxgb4/qp.c 	free_srq_queue(srq, ucontext ? &ucontext->uctx : &rhp->rdev.uctx,
srq              2813 drivers/infiniband/hw/cxgb4/qp.c 		       srq->wr_waitp);
srq              2814 drivers/infiniband/hw/cxgb4/qp.c 	c4iw_free_srq_idx(&rhp->rdev, srq->idx);
srq              2815 drivers/infiniband/hw/cxgb4/qp.c 	c4iw_put_wr_wait(srq->wr_waitp);
srq               395 drivers/infiniband/hw/cxgb4/resource.c 	if (rdev->lldi.vr->srq.size)
srq               425 drivers/infiniband/hw/cxgb4/t4.h static inline u32 t4_srq_avail(struct t4_srq *srq)
srq               427 drivers/infiniband/hw/cxgb4/t4.h 	return srq->size - 1 - srq->in_use;
srq               430 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_srq_produce(struct t4_srq *srq, u8 len16)
srq               432 drivers/infiniband/hw/cxgb4/t4.h 	srq->in_use++;
srq               433 drivers/infiniband/hw/cxgb4/t4.h 	if (++srq->pidx == srq->size)
srq               434 drivers/infiniband/hw/cxgb4/t4.h 		srq->pidx = 0;
srq               435 drivers/infiniband/hw/cxgb4/t4.h 	srq->wq_pidx += DIV_ROUND_UP(len16 * 16, T4_EQ_ENTRY_SIZE);
srq               436 drivers/infiniband/hw/cxgb4/t4.h 	if (srq->wq_pidx >= srq->size * T4_RQ_NUM_SLOTS)
srq               437 drivers/infiniband/hw/cxgb4/t4.h 		srq->wq_pidx %= srq->size * T4_RQ_NUM_SLOTS;
srq               438 drivers/infiniband/hw/cxgb4/t4.h 	srq->queue[srq->size].status.host_pidx = srq->pidx;
srq               441 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_srq_produce_pending_wr(struct t4_srq *srq)
srq               443 drivers/infiniband/hw/cxgb4/t4.h 	srq->pending_in_use++;
srq               444 drivers/infiniband/hw/cxgb4/t4.h 	srq->in_use++;
srq               445 drivers/infiniband/hw/cxgb4/t4.h 	if (++srq->pending_pidx == srq->size)
srq               446 drivers/infiniband/hw/cxgb4/t4.h 		srq->pending_pidx = 0;
srq               449 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_srq_consume_pending_wr(struct t4_srq *srq)
srq               451 drivers/infiniband/hw/cxgb4/t4.h 	srq->pending_in_use--;
srq               452 drivers/infiniband/hw/cxgb4/t4.h 	srq->in_use--;
srq               453 drivers/infiniband/hw/cxgb4/t4.h 	if (++srq->pending_cidx == srq->size)
srq               454 drivers/infiniband/hw/cxgb4/t4.h 		srq->pending_cidx = 0;
srq               457 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_srq_produce_ooo(struct t4_srq *srq)
srq               459 drivers/infiniband/hw/cxgb4/t4.h 	srq->in_use--;
srq               460 drivers/infiniband/hw/cxgb4/t4.h 	srq->ooo_count++;
srq               463 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_srq_consume_ooo(struct t4_srq *srq)
srq               465 drivers/infiniband/hw/cxgb4/t4.h 	srq->cidx++;
srq               466 drivers/infiniband/hw/cxgb4/t4.h 	if (srq->cidx == srq->size)
srq               467 drivers/infiniband/hw/cxgb4/t4.h 		srq->cidx  = 0;
srq               468 drivers/infiniband/hw/cxgb4/t4.h 	srq->queue[srq->size].status.host_cidx = srq->cidx;
srq               469 drivers/infiniband/hw/cxgb4/t4.h 	srq->ooo_count--;
srq               472 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_srq_consume(struct t4_srq *srq)
srq               474 drivers/infiniband/hw/cxgb4/t4.h 	srq->in_use--;
srq               475 drivers/infiniband/hw/cxgb4/t4.h 	if (++srq->cidx == srq->size)
srq               476 drivers/infiniband/hw/cxgb4/t4.h 		srq->cidx = 0;
srq               477 drivers/infiniband/hw/cxgb4/t4.h 	srq->queue[srq->size].status.host_cidx = srq->cidx;
srq               592 drivers/infiniband/hw/cxgb4/t4.h static inline void t4_ring_srq_db(struct t4_srq *srq, u16 inc, u8 len16,
srq               597 drivers/infiniband/hw/cxgb4/t4.h 	if (inc == 1 && srq->bar2_qid == 0 && wqe) {
srq               599 drivers/infiniband/hw/cxgb4/t4.h 			 __func__, srq->pidx, len16);
srq               600 drivers/infiniband/hw/cxgb4/t4.h 		pio_copy(srq->bar2_va + SGE_UDB_WCDOORBELL, (u64 *)wqe);
srq               603 drivers/infiniband/hw/cxgb4/t4.h 			 __func__, srq->pidx, len16);
srq               604 drivers/infiniband/hw/cxgb4/t4.h 		writel(PIDX_T5_V(inc) | QID_V(srq->bar2_qid),
srq               605 drivers/infiniband/hw/cxgb4/t4.h 		       srq->bar2_va + SGE_UDB_KDOORBELL);
srq               315 drivers/infiniband/hw/cxgb4/t4fw_ri_api.h 		} srq;
srq               615 drivers/infiniband/hw/efa/efa_verbs.c 	if (init_attr->srq) {
srq               658 drivers/infiniband/hw/hfi1/qp.c 	struct rvt_srq *srq = qp->ibqp.srq ?
srq               659 drivers/infiniband/hw/hfi1/qp.c 		ibsrq_to_rvtsrq(qp->ibqp.srq) : NULL;
srq               715 drivers/infiniband/hw/hfi1/qp.c 		   srq ? "SRQ" : "RQ",
srq               716 drivers/infiniband/hw/hfi1/qp.c 		   srq ? srq->rq.size : qp->r_rq.size
srq               524 drivers/infiniband/hw/hns/hns_roce_device.h 	void (*event)(struct hns_roce_srq *srq, enum hns_roce_event event);
srq               727 drivers/infiniband/hw/hns/hns_roce_device.h 			__le32 srq;
srq               982 drivers/infiniband/hw/hns/hns_roce_device.h 			   struct hns_roce_srq *srq, u32 pdn, u16 xrcd, u32 cqn,
srq              1229 drivers/infiniband/hw/hns/hns_roce_device.h int hns_roce_create_srq(struct ib_srq *srq,
srq              2015 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				   struct hns_roce_srq *srq)
srq              2063 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				 struct hns_roce_srq *srq)
srq              2066 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 	__hns_roce_v1_cq_clean(hr_cq, qpn, srq);
srq              2693 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				     ibqp->srq ? to_hr_srq(ibqp->srq) : NULL);
srq              2802 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 		if (ibqp->srq)
srq              2806 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				       to_hr_srq(ibqp->srq)->srqn);
srq              2868 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 		if (ibqp->srq)
srq              2872 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				       to_hr_srq(ibqp->srq)->srqn);
srq              3306 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				     ibqp->srq ? to_hr_srq(ibqp->srq) : NULL);
srq              3618 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 		__hns_roce_v1_cq_clean(recv_cq, hr_qp->qpn, hr_qp->ibqp.srq ?
srq              3619 drivers/infiniband/hw/hns/hns_roce_hw_v1.c 				       to_hr_srq(hr_qp->ibqp.srq) : NULL);
srq              2471 drivers/infiniband/hw/hns/hns_roce_hw_v2.c static void *get_srq_wqe(struct hns_roce_srq *srq, int n)
srq              2473 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	return hns_roce_buf_offset(&srq->buf, n << srq->wqe_shift);
srq              2476 drivers/infiniband/hw/hns/hns_roce_hw_v2.c static void hns_roce_free_srq_wqe(struct hns_roce_srq *srq, int wqe_index)
srq              2479 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	spin_lock(&srq->lock);
srq              2481 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	bitmap_clear(srq->idx_que.bitmap, wqe_index, 1);
srq              2482 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	srq->tail++;
srq              2484 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	spin_unlock(&srq->lock);
srq              2493 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				   struct hns_roce_srq *srq)
srq              2516 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 			if (srq &&
srq              2521 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				hns_roce_free_srq_wqe(srq, wqe_index);
srq              2547 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				 struct hns_roce_srq *srq)
srq              2550 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	__hns_roce_v2_cq_clean(hr_cq, qpn, srq);
srq              2697 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	struct hns_roce_srq *srq = NULL;
srq              2757 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	} else if ((*cur_qp)->ibqp.srq) {
srq              2758 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		srq = to_hr_srq((*cur_qp)->ibqp.srq);
srq              2762 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		wc->wr_id = srq->wrid[wqe_ctr];
srq              2763 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		hns_roce_free_srq_wqe(srq, wqe_ctr);
srq              3249 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		       hr_qp->ibqp.srq) ? 0 :
srq              3347 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	if (ibqp->srq) {
srq              3350 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 			       to_hr_srq(ibqp->srq)->srqn);
srq              3616 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	if (ibqp->srq) {
srq              3623 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 			       to_hr_srq(ibqp->srq)->srqn);
srq              3693 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	if (!ibqp->srq)
srq              4421 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		if (!ibqp->srq) {
srq              4439 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		     ibqp->srq ? 1 : 0);
srq              4462 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				     ibqp->srq ? to_hr_srq(ibqp->srq) : NULL);
srq              4671 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		__hns_roce_v2_cq_clean(recv_cq, hr_qp->qpn, hr_qp->ibqp.srq ?
srq              4672 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				       to_hr_srq(hr_qp->ibqp.srq) : NULL);
srq              5053 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		srqn = roce_get_field(aeqe->event.srq_event.srq,
srq              6028 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				   struct hns_roce_srq *srq, u32 pdn, u16 xrcd,
srq              6048 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		       ilog2(srq->max));
srq              6051 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		       SRQC_BYTE_4_SRQN_S, srq->srqn);
srq              6069 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		       SRQC_BYTE_28_RQWS_S, srq->max_gs <= 0 ? 0 :
srq              6070 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		       fls(srq->max_gs - 1));
srq              6127 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	struct hns_roce_srq *srq = to_hr_srq(ibsrq);
srq              6134 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		if (srq_attr->srq_limit >= srq->max)
srq              6153 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		ret = hns_roce_cmd_mbox(hr_dev, mailbox->dma, 0, srq->srqn, 0,
srq              6170 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	struct hns_roce_srq *srq = to_hr_srq(ibsrq);
srq              6181 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	ret = hns_roce_cmd_mbox(hr_dev, 0, mailbox->dma, srq->srqn, 0,
srq              6194 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	attr->max_wr    = srq->max - 1;
srq              6195 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	attr->max_sge   = srq->max_gs;
srq              6234 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	struct hns_roce_srq *srq = to_hr_srq(ibsrq);
srq              6245 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	spin_lock_irqsave(&srq->lock, flags);
srq              6247 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	ind = srq->head & (srq->max - 1);
srq              6250 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		if (unlikely(wr->num_sge > srq->max_gs)) {
srq              6256 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		if (unlikely(srq->head == srq->tail)) {
srq              6262 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		wqe_idx = find_empty_entry(&srq->idx_que, srq->max);
srq              6269 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		fill_idx_queue(&srq->idx_que, ind, wqe_idx);
srq              6270 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		wqe = get_srq_wqe(srq, wqe_idx);
srq              6279 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		if (i < srq->max_gs) {
srq              6285 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		srq->wrid[wqe_idx] = wr->wr_id;
srq              6286 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		ind = (ind + 1) & (srq->max - 1);
srq              6290 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		srq->head += nreq;
srq              6300 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 				    (srq->srqn & V2_DB_BYTE_4_TAG_M));
srq              6301 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		srq_db.parameter = cpu_to_le32(srq->head);
srq              6303 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		hns_roce_write64(hr_dev, (__le32 *)&srq_db, srq->db_reg_l);
srq              6307 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq               633 drivers/infiniband/hw/hns/hns_roce_qp.c 	    attr->qp_type == IB_QPT_XRC_TGT || attr->srq ||
srq                15 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_srq *srq;
srq                18 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq = xa_load(&srq_table->xa, srqn & (hr_dev->caps.num_srqs - 1));
srq                19 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (srq)
srq                20 drivers/infiniband/hw/hns/hns_roce_srq.c 		atomic_inc(&srq->refcount);
srq                23 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (!srq) {
srq                28 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->event(srq, event_type);
srq                30 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (atomic_dec_and_test(&srq->refcount))
srq                31 drivers/infiniband/hw/hns/hns_roce_srq.c 		complete(&srq->free);
srq                34 drivers/infiniband/hw/hns/hns_roce_srq.c static void hns_roce_ib_srq_event(struct hns_roce_srq *srq,
srq                37 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_dev *hr_dev = to_hr_dev(srq->ibsrq.device);
srq                38 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct ib_srq *ibsrq = &srq->ibsrq;
srq                43 drivers/infiniband/hw/hns/hns_roce_srq.c 		event.element.srq = ibsrq;
srq                54 drivers/infiniband/hw/hns/hns_roce_srq.c 			   event_type, srq->srqn);
srq                82 drivers/infiniband/hw/hns/hns_roce_srq.c 			      u64 db_rec_addr, struct hns_roce_srq *srq)
srq                95 drivers/infiniband/hw/hns/hns_roce_srq.c 				       srq->mtt.first_seg,
srq               105 drivers/infiniband/hw/hns/hns_roce_srq.c 				       srq->idx_que.mtt.first_seg,
srq               113 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_bitmap_alloc(&srq_table->bitmap, &srq->srqn);
srq               119 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_table_get(hr_dev, &srq_table->table, srq->srqn);
srq               123 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = xa_err(xa_store(&srq_table->xa, srq->srqn, srq, GFP_KERNEL));
srq               133 drivers/infiniband/hw/hns/hns_roce_srq.c 	hr_dev->hw->write_srqc(hr_dev, srq, pdn, xrcd, cqn, mailbox->buf,
srq               137 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_sw2hw_srq(hr_dev, mailbox, srq->srqn);
srq               142 drivers/infiniband/hw/hns/hns_roce_srq.c 	atomic_set(&srq->refcount, 1);
srq               143 drivers/infiniband/hw/hns/hns_roce_srq.c 	init_completion(&srq->free);
srq               147 drivers/infiniband/hw/hns/hns_roce_srq.c 	xa_erase(&srq_table->xa, srq->srqn);
srq               150 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_table_put(hr_dev, &srq_table->table, srq->srqn);
srq               153 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_bitmap_free(&srq_table->bitmap, srq->srqn, BITMAP_NO_RR);
srq               158 drivers/infiniband/hw/hns/hns_roce_srq.c 			      struct hns_roce_srq *srq)
srq               163 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_hw2sw_srq(hr_dev, NULL, srq->srqn);
srq               166 drivers/infiniband/hw/hns/hns_roce_srq.c 			ret, srq->srqn);
srq               168 drivers/infiniband/hw/hns/hns_roce_srq.c 	xa_erase(&srq_table->xa, srq->srqn);
srq               170 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (atomic_dec_and_test(&srq->refcount))
srq               171 drivers/infiniband/hw/hns/hns_roce_srq.c 		complete(&srq->free);
srq               172 drivers/infiniband/hw/hns/hns_roce_srq.c 	wait_for_completion(&srq->free);
srq               174 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_table_put(hr_dev, &srq_table->table, srq->srqn);
srq               175 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_bitmap_free(&srq_table->bitmap, srq->srqn, BITMAP_NO_RR);
srq               178 drivers/infiniband/hw/hns/hns_roce_srq.c static int create_user_srq(struct hns_roce_srq *srq, struct ib_udata *udata,
srq               181 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_dev *hr_dev = to_hr_dev(srq->ibsrq.device);
srq               189 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->umem = ib_umem_get(udata, ucmd.buf_addr, srq_buf_size, 0, 0);
srq               190 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (IS_ERR(srq->umem))
srq               191 drivers/infiniband/hw/hns/hns_roce_srq.c 		return PTR_ERR(srq->umem);
srq               193 drivers/infiniband/hw/hns/hns_roce_srq.c 	buf = &srq->buf;
srq               194 drivers/infiniband/hw/hns/hns_roce_srq.c 	buf->npages = (ib_umem_page_count(srq->umem) +
srq               199 drivers/infiniband/hw/hns/hns_roce_srq.c 				&srq->mtt);
srq               203 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_ib_umem_write_mtt(hr_dev, &srq->mtt, srq->umem);
srq               208 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.umem = ib_umem_get(udata, ucmd.que_addr,
srq               209 drivers/infiniband/hw/hns/hns_roce_srq.c 					srq->idx_que.buf_size, 0, 0);
srq               210 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (IS_ERR(srq->idx_que.umem)) {
srq               212 drivers/infiniband/hw/hns/hns_roce_srq.c 		ret = PTR_ERR(srq->idx_que.umem);
srq               216 drivers/infiniband/hw/hns/hns_roce_srq.c 	buf = &srq->idx_que.idx_buf;
srq               217 drivers/infiniband/hw/hns/hns_roce_srq.c 	buf->npages = DIV_ROUND_UP(ib_umem_page_count(srq->idx_que.umem),
srq               221 drivers/infiniband/hw/hns/hns_roce_srq.c 				&srq->idx_que.mtt);
srq               227 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_ib_umem_write_mtt(hr_dev, &srq->idx_que.mtt,
srq               228 drivers/infiniband/hw/hns/hns_roce_srq.c 					 srq->idx_que.umem);
srq               238 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
srq               241 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->idx_que.umem);
srq               244 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->mtt);
srq               247 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->umem);
srq               252 drivers/infiniband/hw/hns/hns_roce_srq.c static int hns_roce_create_idx_que(struct ib_pd *pd, struct hns_roce_srq *srq,
srq               256 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_idx_que *idx_que = &srq->idx_que;
srq               258 drivers/infiniband/hw/hns/hns_roce_srq.c 	idx_que->bitmap = bitmap_zalloc(srq->max, GFP_KERNEL);
srq               262 drivers/infiniband/hw/hns/hns_roce_srq.c 	idx_que->buf_size = srq->idx_que.buf_size;
srq               273 drivers/infiniband/hw/hns/hns_roce_srq.c static int create_kernel_srq(struct hns_roce_srq *srq, int srq_buf_size)
srq               275 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_dev *hr_dev = to_hr_dev(srq->ibsrq.device);
srq               280 drivers/infiniband/hw/hns/hns_roce_srq.c 			       &srq->buf, page_shift))
srq               283 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->head = 0;
srq               284 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->tail = srq->max - 1;
srq               286 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_mtt_init(hr_dev, srq->buf.npages, srq->buf.page_shift,
srq               287 drivers/infiniband/hw/hns/hns_roce_srq.c 				&srq->mtt);
srq               291 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_buf_write_mtt(hr_dev, &srq->mtt, &srq->buf);
srq               296 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_create_idx_que(srq->ibsrq.pd, srq, page_shift);
srq               303 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_mtt_init(hr_dev, srq->idx_que.idx_buf.npages,
srq               304 drivers/infiniband/hw/hns/hns_roce_srq.c 				srq->idx_que.idx_buf.page_shift,
srq               305 drivers/infiniband/hw/hns/hns_roce_srq.c 				&srq->idx_que.mtt);
srq               310 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_buf_write_mtt(hr_dev, &srq->idx_que.mtt,
srq               311 drivers/infiniband/hw/hns/hns_roce_srq.c 				     &srq->idx_que.idx_buf);
srq               315 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->wrid = kvmalloc_array(srq->max, sizeof(u64), GFP_KERNEL);
srq               316 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (!srq->wrid) {
srq               324 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
srq               327 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_buf_free(hr_dev, srq->idx_que.buf_size,
srq               328 drivers/infiniband/hw/hns/hns_roce_srq.c 			  &srq->idx_que.idx_buf);
srq               329 drivers/infiniband/hw/hns/hns_roce_srq.c 	kfree(srq->idx_que.bitmap);
srq               332 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->mtt);
srq               335 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_buf_free(hr_dev, srq_buf_size, &srq->buf);
srq               341 drivers/infiniband/hw/hns/hns_roce_srq.c 			     struct hns_roce_srq *srq)
srq               343 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
srq               344 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->idx_que.umem);
srq               345 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->mtt);
srq               346 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->umem);
srq               350 drivers/infiniband/hw/hns/hns_roce_srq.c 			       struct hns_roce_srq *srq, int srq_buf_size)
srq               352 drivers/infiniband/hw/hns/hns_roce_srq.c 	kvfree(srq->wrid);
srq               353 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
srq               354 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_buf_free(hr_dev, srq->idx_que.buf_size, &srq->idx_que.idx_buf);
srq               355 drivers/infiniband/hw/hns/hns_roce_srq.c 	kfree(srq->idx_que.bitmap);
srq               356 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->mtt);
srq               357 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_buf_free(hr_dev, srq_buf_size, &srq->buf);
srq               366 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_srq *srq = to_hr_srq(ib_srq);
srq               377 drivers/infiniband/hw/hns/hns_roce_srq.c 	mutex_init(&srq->mutex);
srq               378 drivers/infiniband/hw/hns/hns_roce_srq.c 	spin_lock_init(&srq->lock);
srq               380 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->max = roundup_pow_of_two(srq_init_attr->attr.max_wr + 1);
srq               381 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->max_gs = srq_init_attr->attr.max_sge;
srq               383 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq_desc_size = roundup_pow_of_two(max(16, 16 * srq->max_gs));
srq               385 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->wqe_shift = ilog2(srq_desc_size);
srq               387 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq_buf_size = srq->max * srq_desc_size;
srq               389 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.entry_sz = HNS_ROCE_IDX_QUE_ENTRY_SZ;
srq               390 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.buf_size = srq->max * srq->idx_que.entry_sz;
srq               391 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->mtt.mtt_type = MTT_TYPE_SRQWQE;
srq               392 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.mtt.mtt_type = MTT_TYPE_IDX;
srq               395 drivers/infiniband/hw/hns/hns_roce_srq.c 		ret = create_user_srq(srq, udata, srq_buf_size);
srq               401 drivers/infiniband/hw/hns/hns_roce_srq.c 		ret = create_kernel_srq(srq, srq_buf_size);
srq               411 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->db_reg_l = hr_dev->reg_base + SRQ_DB_REG;
srq               414 drivers/infiniband/hw/hns/hns_roce_srq.c 				 &srq->mtt, 0, srq);
srq               418 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->event = hns_roce_ib_srq_event;
srq               419 drivers/infiniband/hw/hns/hns_roce_srq.c 	resp.srqn = srq->srqn;
srq               432 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_srq_free(hr_dev, srq);
srq               436 drivers/infiniband/hw/hns/hns_roce_srq.c 		destroy_user_srq(hr_dev, srq);
srq               438 drivers/infiniband/hw/hns/hns_roce_srq.c 		destroy_kernel_srq(hr_dev, srq, srq_buf_size);
srq               447 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_srq *srq = to_hr_srq(ibsrq);
srq               449 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_srq_free(hr_dev, srq);
srq               450 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->mtt);
srq               453 drivers/infiniband/hw/hns/hns_roce_srq.c 		hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
srq               455 drivers/infiniband/hw/hns/hns_roce_srq.c 		kvfree(srq->wrid);
srq               456 drivers/infiniband/hw/hns/hns_roce_srq.c 		hns_roce_buf_free(hr_dev, srq->max << srq->wqe_shift,
srq               457 drivers/infiniband/hw/hns/hns_roce_srq.c 				  &srq->buf);
srq               459 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->idx_que.umem);
srq               460 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->umem);
srq               413 drivers/infiniband/hw/i40iw/i40iw_user.h u64 *i40iw_qp_get_next_srq_wqe(struct i40iw_srq_uk *srq, u32 *wqe_idx);
srq               777 drivers/infiniband/hw/i40iw/i40iw_verbs.c 	init_attr->srq = iwqp->ibqp.srq;
srq               668 drivers/infiniband/hw/mlx4/cq.c 	struct mlx4_ib_srq *srq;
srq               744 drivers/infiniband/hw/mlx4/cq.c 	} else if ((*cur_qp)->ibqp.srq) {
srq               745 drivers/infiniband/hw/mlx4/cq.c 		srq = to_msrq((*cur_qp)->ibqp.srq);
srq               747 drivers/infiniband/hw/mlx4/cq.c 		wc->wr_id = srq->wrid[wqe_ctr];
srq               748 drivers/infiniband/hw/mlx4/cq.c 		mlx4_ib_free_srq_wqe(srq, wqe_ctr);
srq               750 drivers/infiniband/hw/mlx4/cq.c 		srq = to_mibsrq(msrq);
srq               752 drivers/infiniband/hw/mlx4/cq.c 		wc->wr_id = srq->wrid[wqe_ctr];
srq               753 drivers/infiniband/hw/mlx4/cq.c 		mlx4_ib_free_srq_wqe(srq, wqe_ctr);
srq               919 drivers/infiniband/hw/mlx4/cq.c void __mlx4_ib_cq_clean(struct mlx4_ib_cq *cq, u32 qpn, struct mlx4_ib_srq *srq)
srq               947 drivers/infiniband/hw/mlx4/cq.c 			if (srq && !(cqe->owner_sr_opcode & MLX4_CQE_IS_SEND_MASK))
srq               948 drivers/infiniband/hw/mlx4/cq.c 				mlx4_ib_free_srq_wqe(srq, be16_to_cpu(cqe->wqe_index));
srq               972 drivers/infiniband/hw/mlx4/cq.c void mlx4_ib_cq_clean(struct mlx4_ib_cq *cq, u32 qpn, struct mlx4_ib_srq *srq)
srq               975 drivers/infiniband/hw/mlx4/cq.c 	__mlx4_ib_cq_clean(cq, qpn, srq);
srq               544 drivers/infiniband/hw/mlx4/main.c 	props->max_srq		   = dev->dev->quotas.srq;
srq              3138 drivers/infiniband/hw/mlx4/main.c 		if (!mqp->ibqp.srq) {
srq               751 drivers/infiniband/hw/mlx4/mlx4_ib.h void __mlx4_ib_cq_clean(struct mlx4_ib_cq *cq, u32 qpn, struct mlx4_ib_srq *srq);
srq               752 drivers/infiniband/hw/mlx4/mlx4_ib.h void mlx4_ib_cq_clean(struct mlx4_ib_cq *cq, u32 qpn, struct mlx4_ib_srq *srq);
srq               761 drivers/infiniband/hw/mlx4/mlx4_ib.h int mlx4_ib_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *init_attr,
srq               765 drivers/infiniband/hw/mlx4/mlx4_ib.h int mlx4_ib_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
srq               766 drivers/infiniband/hw/mlx4/mlx4_ib.h void mlx4_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
srq               767 drivers/infiniband/hw/mlx4/mlx4_ib.h void mlx4_ib_free_srq_wqe(struct mlx4_ib_srq *srq, int wqe_index);
srq               514 drivers/infiniband/hw/mlx4/qp.c 	return !attr->srq;
srq              1462 drivers/infiniband/hw/mlx4/qp.c 				 qp->ibqp.srq ? to_msrq(qp->ibqp.srq): NULL);
srq              2168 drivers/infiniband/hw/mlx4/qp.c 		ibsrq	    = ibqp->srq;
srq                42 drivers/infiniband/hw/mlx4/srq.c static void *get_wqe(struct mlx4_ib_srq *srq, int n)
srq                44 drivers/infiniband/hw/mlx4/srq.c 	return mlx4_buf_offset(&srq->buf, n << srq->msrq.wqe_shift);
srq                47 drivers/infiniband/hw/mlx4/srq.c static void mlx4_ib_srq_event(struct mlx4_srq *srq, enum mlx4_event type)
srq                50 drivers/infiniband/hw/mlx4/srq.c 	struct ib_srq *ibsrq = &to_mibsrq(srq)->ibsrq;
srq                54 drivers/infiniband/hw/mlx4/srq.c 		event.element.srq = ibsrq;
srq                64 drivers/infiniband/hw/mlx4/srq.c 			       "on SRQ %06x\n", type, srq->srqn);
srq                79 drivers/infiniband/hw/mlx4/srq.c 	struct mlx4_ib_srq *srq = to_msrq(ib_srq);
srq                94 drivers/infiniband/hw/mlx4/srq.c 	mutex_init(&srq->mutex);
srq                95 drivers/infiniband/hw/mlx4/srq.c 	spin_lock_init(&srq->lock);
srq                96 drivers/infiniband/hw/mlx4/srq.c 	srq->msrq.max    = roundup_pow_of_two(init_attr->attr.max_wr + 1);
srq                97 drivers/infiniband/hw/mlx4/srq.c 	srq->msrq.max_gs = init_attr->attr.max_sge;
srq               101 drivers/infiniband/hw/mlx4/srq.c 					   srq->msrq.max_gs *
srq               103 drivers/infiniband/hw/mlx4/srq.c 	srq->msrq.wqe_shift = ilog2(desc_size);
srq               105 drivers/infiniband/hw/mlx4/srq.c 	buf_size = srq->msrq.max * desc_size;
srq               113 drivers/infiniband/hw/mlx4/srq.c 		srq->umem = ib_umem_get(udata, ucmd.buf_addr, buf_size, 0, 0);
srq               114 drivers/infiniband/hw/mlx4/srq.c 		if (IS_ERR(srq->umem))
srq               115 drivers/infiniband/hw/mlx4/srq.c 			return PTR_ERR(srq->umem);
srq               117 drivers/infiniband/hw/mlx4/srq.c 		err = mlx4_mtt_init(dev->dev, ib_umem_page_count(srq->umem),
srq               118 drivers/infiniband/hw/mlx4/srq.c 				    PAGE_SHIFT, &srq->mtt);
srq               122 drivers/infiniband/hw/mlx4/srq.c 		err = mlx4_ib_umem_write_mtt(dev, &srq->mtt, srq->umem);
srq               126 drivers/infiniband/hw/mlx4/srq.c 		err = mlx4_ib_db_map_user(udata, ucmd.db_addr, &srq->db);
srq               130 drivers/infiniband/hw/mlx4/srq.c 		err = mlx4_db_alloc(dev->dev, &srq->db, 0);
srq               134 drivers/infiniband/hw/mlx4/srq.c 		*srq->db.db = 0;
srq               137 drivers/infiniband/hw/mlx4/srq.c 				   &srq->buf)) {
srq               142 drivers/infiniband/hw/mlx4/srq.c 		srq->head    = 0;
srq               143 drivers/infiniband/hw/mlx4/srq.c 		srq->tail    = srq->msrq.max - 1;
srq               144 drivers/infiniband/hw/mlx4/srq.c 		srq->wqe_ctr = 0;
srq               146 drivers/infiniband/hw/mlx4/srq.c 		for (i = 0; i < srq->msrq.max; ++i) {
srq               147 drivers/infiniband/hw/mlx4/srq.c 			next = get_wqe(srq, i);
srq               149 drivers/infiniband/hw/mlx4/srq.c 				cpu_to_be16((i + 1) & (srq->msrq.max - 1));
srq               157 drivers/infiniband/hw/mlx4/srq.c 		err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift,
srq               158 drivers/infiniband/hw/mlx4/srq.c 				    &srq->mtt);
srq               162 drivers/infiniband/hw/mlx4/srq.c 		err = mlx4_buf_write_mtt(dev->dev, &srq->mtt, &srq->buf);
srq               166 drivers/infiniband/hw/mlx4/srq.c 		srq->wrid = kvmalloc_array(srq->msrq.max,
srq               168 drivers/infiniband/hw/mlx4/srq.c 		if (!srq->wrid) {
srq               180 drivers/infiniband/hw/mlx4/srq.c 			     &srq->mtt, srq->db.dma, &srq->msrq);
srq               184 drivers/infiniband/hw/mlx4/srq.c 	srq->msrq.event = mlx4_ib_srq_event;
srq               185 drivers/infiniband/hw/mlx4/srq.c 	srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn;
srq               188 drivers/infiniband/hw/mlx4/srq.c 		if (ib_copy_to_udata(udata, &srq->msrq.srqn, sizeof (__u32))) {
srq               193 drivers/infiniband/hw/mlx4/srq.c 	init_attr->attr.max_wr = srq->msrq.max - 1;
srq               199 drivers/infiniband/hw/mlx4/srq.c 		mlx4_ib_db_unmap_user(ucontext, &srq->db);
srq               201 drivers/infiniband/hw/mlx4/srq.c 		kvfree(srq->wrid);
srq               204 drivers/infiniband/hw/mlx4/srq.c 	mlx4_mtt_cleanup(dev->dev, &srq->mtt);
srq               207 drivers/infiniband/hw/mlx4/srq.c 	if (!srq->umem)
srq               208 drivers/infiniband/hw/mlx4/srq.c 		mlx4_buf_free(dev->dev, buf_size, &srq->buf);
srq               209 drivers/infiniband/hw/mlx4/srq.c 	ib_umem_release(srq->umem);
srq               213 drivers/infiniband/hw/mlx4/srq.c 		mlx4_db_free(dev->dev, &srq->db);
srq               222 drivers/infiniband/hw/mlx4/srq.c 	struct mlx4_ib_srq *srq = to_msrq(ibsrq);
srq               230 drivers/infiniband/hw/mlx4/srq.c 		if (attr->srq_limit >= srq->msrq.max)
srq               233 drivers/infiniband/hw/mlx4/srq.c 		mutex_lock(&srq->mutex);
srq               234 drivers/infiniband/hw/mlx4/srq.c 		ret = mlx4_srq_arm(dev->dev, &srq->msrq, attr->srq_limit);
srq               235 drivers/infiniband/hw/mlx4/srq.c 		mutex_unlock(&srq->mutex);
srq               247 drivers/infiniband/hw/mlx4/srq.c 	struct mlx4_ib_srq *srq = to_msrq(ibsrq);
srq               251 drivers/infiniband/hw/mlx4/srq.c 	ret = mlx4_srq_query(dev->dev, &srq->msrq, &limit_watermark);
srq               256 drivers/infiniband/hw/mlx4/srq.c 	srq_attr->max_wr    = srq->msrq.max - 1;
srq               257 drivers/infiniband/hw/mlx4/srq.c 	srq_attr->max_sge   = srq->msrq.max_gs;
srq               262 drivers/infiniband/hw/mlx4/srq.c void mlx4_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata)
srq               264 drivers/infiniband/hw/mlx4/srq.c 	struct mlx4_ib_dev *dev = to_mdev(srq->device);
srq               265 drivers/infiniband/hw/mlx4/srq.c 	struct mlx4_ib_srq *msrq = to_msrq(srq);
srq               286 drivers/infiniband/hw/mlx4/srq.c void mlx4_ib_free_srq_wqe(struct mlx4_ib_srq *srq, int wqe_index)
srq               291 drivers/infiniband/hw/mlx4/srq.c 	spin_lock(&srq->lock);
srq               293 drivers/infiniband/hw/mlx4/srq.c 	next = get_wqe(srq, srq->tail);
srq               295 drivers/infiniband/hw/mlx4/srq.c 	srq->tail = wqe_index;
srq               297 drivers/infiniband/hw/mlx4/srq.c 	spin_unlock(&srq->lock);
srq               303 drivers/infiniband/hw/mlx4/srq.c 	struct mlx4_ib_srq *srq = to_msrq(ibsrq);
srq               312 drivers/infiniband/hw/mlx4/srq.c 	spin_lock_irqsave(&srq->lock, flags);
srq               321 drivers/infiniband/hw/mlx4/srq.c 		if (unlikely(wr->num_sge > srq->msrq.max_gs)) {
srq               327 drivers/infiniband/hw/mlx4/srq.c 		if (unlikely(srq->head == srq->tail)) {
srq               333 drivers/infiniband/hw/mlx4/srq.c 		srq->wrid[srq->head] = wr->wr_id;
srq               335 drivers/infiniband/hw/mlx4/srq.c 		next      = get_wqe(srq, srq->head);
srq               336 drivers/infiniband/hw/mlx4/srq.c 		srq->head = be16_to_cpu(next->next_wqe_index);
srq               345 drivers/infiniband/hw/mlx4/srq.c 		if (i < srq->msrq.max_gs) {
srq               353 drivers/infiniband/hw/mlx4/srq.c 		srq->wqe_ctr += nreq;
srq               361 drivers/infiniband/hw/mlx4/srq.c 		*srq->db.db = cpu_to_be32(srq->wqe_ctr);
srq               365 drivers/infiniband/hw/mlx4/srq.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq               170 drivers/infiniband/hw/mlx5/cq.c 	struct mlx5_ib_srq *srq;
srq               177 drivers/infiniband/hw/mlx5/cq.c 	if (qp->ibqp.srq || qp->ibqp.xrcd) {
srq               182 drivers/infiniband/hw/mlx5/cq.c 			srq = to_mibsrq(msrq);
srq               184 drivers/infiniband/hw/mlx5/cq.c 			srq = to_msrq(qp->ibqp.srq);
srq               186 drivers/infiniband/hw/mlx5/cq.c 		if (srq) {
srq               188 drivers/infiniband/hw/mlx5/cq.c 			wc->wr_id = srq->wrid[wqe_ctr];
srq               189 drivers/infiniband/hw/mlx5/cq.c 			mlx5_ib_free_srq_wqe(srq, wqe_ctr);
srq               531 drivers/infiniband/hw/mlx5/cq.c 			struct mlx5_ib_srq *srq;
srq               533 drivers/infiniband/hw/mlx5/cq.c 			if ((*cur_qp)->ibqp.srq) {
srq               534 drivers/infiniband/hw/mlx5/cq.c 				srq = to_msrq((*cur_qp)->ibqp.srq);
srq               536 drivers/infiniband/hw/mlx5/cq.c 				wc->wr_id = srq->wrid[wqe_ctr];
srq               537 drivers/infiniband/hw/mlx5/cq.c 				mlx5_ib_free_srq_wqe(srq, wqe_ctr);
srq              1034 drivers/infiniband/hw/mlx5/cq.c void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 rsn, struct mlx5_ib_srq *srq)
srq              1062 drivers/infiniband/hw/mlx5/cq.c 			if (srq && (ntohl(cqe64->srqn) & 0xffffff))
srq              1063 drivers/infiniband/hw/mlx5/cq.c 				mlx5_ib_free_srq_wqe(srq, be16_to_cpu(cqe64->wqe_counter));
srq              1085 drivers/infiniband/hw/mlx5/cq.c void mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq)
srq              1091 drivers/infiniband/hw/mlx5/cq.c 	__mlx5_ib_cq_clean(cq, qpn, srq);
srq               584 drivers/infiniband/hw/mlx5/devx.c 		struct mlx5_core_srq *srq = &(to_msrq(uobj->object)->msrq);
srq               587 drivers/infiniband/hw/mlx5/devx.c 		switch (srq->common.res) {
srq              4499 drivers/infiniband/hw/mlx5/main.c 		if (!mqp->ibqp.srq) {
srq              1103 drivers/infiniband/hw/mlx5/mlx5_ib.h void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
srq              1104 drivers/infiniband/hw/mlx5/mlx5_ib.h void mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
srq              1105 drivers/infiniband/hw/mlx5/mlx5_ib.h void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int wqe_index);
srq              1110 drivers/infiniband/hw/mlx5/mlx5_ib.h int mlx5_ib_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *init_attr,
srq              1115 drivers/infiniband/hw/mlx5/mlx5_ib.h void mlx5_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
srq              1138 drivers/infiniband/hw/mlx5/mlx5_ib.h int mlx5_ib_read_user_wqe_srq(struct mlx5_ib_srq *srq, int wqe_index,
srq              1086 drivers/infiniband/hw/mlx5/odp.c 						   struct mlx5_ib_srq *srq,
srq              1090 drivers/infiniband/hw/mlx5/odp.c 	int wqe_size = 1 << srq->msrq.wqe_shift;
srq              1130 drivers/infiniband/hw/mlx5/odp.c 	struct mlx5_core_srq *srq;
srq              1134 drivers/infiniband/hw/mlx5/odp.c 		srq = mlx5_cmd_get_srq(dev, wq_num);
srq              1135 drivers/infiniband/hw/mlx5/odp.c 		if (srq)
srq              1136 drivers/infiniband/hw/mlx5/odp.c 			common = &srq->common;
srq              1214 drivers/infiniband/hw/mlx5/odp.c 		struct mlx5_ib_srq *srq = res_to_srq(res);
srq              1216 drivers/infiniband/hw/mlx5/odp.c 		ret = mlx5_ib_read_user_wqe_srq(srq, wqe_index, wqe, PAGE_SIZE,
srq              1221 drivers/infiniband/hw/mlx5/odp.c 			dev, srq, &wqe, &wqe_end, bytes_copied);
srq               257 drivers/infiniband/hw/mlx5/qp.c int mlx5_ib_read_user_wqe_srq(struct mlx5_ib_srq *srq,
srq               263 drivers/infiniband/hw/mlx5/qp.c 	struct ib_umem *umem = srq->umem;
srq               272 drivers/infiniband/hw/mlx5/qp.c 					   srq->msrq.max,
srq               273 drivers/infiniband/hw/mlx5/qp.c 					   srq->msrq.wqe_shift,
srq               565 drivers/infiniband/hw/mlx5/qp.c 	    attr->qp_type == IB_QPT_XRC_TGT || attr->srq ||
srq              1171 drivers/infiniband/hw/mlx5/qp.c 	if (attr->srq || (attr->qp_type == IB_QPT_XRC_TGT) ||
srq              2214 drivers/infiniband/hw/mlx5/qp.c 		if (init_attr->srq &&
srq              2215 drivers/infiniband/hw/mlx5/qp.c 		    init_attr->srq->srq_type == IB_SRQT_TM)
srq              2234 drivers/infiniband/hw/mlx5/qp.c 		if (init_attr->srq) {
srq              2236 drivers/infiniband/hw/mlx5/qp.c 			MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(init_attr->srq)->msrq.srqn);
srq              2483 drivers/infiniband/hw/mlx5/qp.c 				   qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
srq              2552 drivers/infiniband/hw/mlx5/qp.c 	if (!attr->srq || !attr->recv_cq)
srq              2573 drivers/infiniband/hw/mlx5/qp.c 	MLX5_SET(dctc, dctc, srqn_xrqn, to_msrq(attr->srq)->msrq.srqn);
srq              3717 drivers/infiniband/hw/mlx5/qp.c 				 ibqp->srq ? to_msrq(ibqp->srq) : NULL);
srq              5812 drivers/infiniband/hw/mlx5/qp.c 	qp_init_attr->srq = ibqp->srq;
srq                14 drivers/infiniband/hw/mlx5/srq.c static void *get_wqe(struct mlx5_ib_srq *srq, int n)
srq                16 drivers/infiniband/hw/mlx5/srq.c 	return mlx5_frag_buf_get_wqe(&srq->fbc, n);
srq                19 drivers/infiniband/hw/mlx5/srq.c static void mlx5_ib_srq_event(struct mlx5_core_srq *srq, enum mlx5_event type)
srq                22 drivers/infiniband/hw/mlx5/srq.c 	struct ib_srq *ibsrq = &to_mibsrq(srq)->ibsrq;
srq                26 drivers/infiniband/hw/mlx5/srq.c 		event.element.srq = ibsrq;
srq                36 drivers/infiniband/hw/mlx5/srq.c 				type, srq->srqn);
srq                44 drivers/infiniband/hw/mlx5/srq.c static int create_srq_user(struct ib_pd *pd, struct mlx5_ib_srq *srq,
srq                81 drivers/infiniband/hw/mlx5/srq.c 	srq->wq_sig = !!(ucmd.flags & MLX5_SRQ_FLAG_SIGNATURE);
srq                83 drivers/infiniband/hw/mlx5/srq.c 	srq->umem = ib_umem_get(udata, ucmd.buf_addr, buf_size, 0, 0);
srq                84 drivers/infiniband/hw/mlx5/srq.c 	if (IS_ERR(srq->umem)) {
srq                86 drivers/infiniband/hw/mlx5/srq.c 		err = PTR_ERR(srq->umem);
srq                90 drivers/infiniband/hw/mlx5/srq.c 	mlx5_ib_cont_pages(srq->umem, ucmd.buf_addr, 0, &npages,
srq               105 drivers/infiniband/hw/mlx5/srq.c 	mlx5_ib_populate_pas(dev, srq->umem, page_shift, in->pas, 0);
srq               107 drivers/infiniband/hw/mlx5/srq.c 	err = mlx5_ib_db_map_user(ucontext, udata, ucmd.db_addr, &srq->db);
srq               126 drivers/infiniband/hw/mlx5/srq.c 	ib_umem_release(srq->umem);
srq               131 drivers/infiniband/hw/mlx5/srq.c static int create_srq_kernel(struct mlx5_ib_dev *dev, struct mlx5_ib_srq *srq,
srq               138 drivers/infiniband/hw/mlx5/srq.c 	err = mlx5_db_alloc(dev->mdev, &srq->db);
srq               144 drivers/infiniband/hw/mlx5/srq.c 	if (mlx5_frag_buf_alloc_node(dev->mdev, buf_size, &srq->buf,
srq               151 drivers/infiniband/hw/mlx5/srq.c 	mlx5_init_fbc(srq->buf.frags, srq->msrq.wqe_shift, ilog2(srq->msrq.max),
srq               152 drivers/infiniband/hw/mlx5/srq.c 		      &srq->fbc);
srq               154 drivers/infiniband/hw/mlx5/srq.c 	srq->head    = 0;
srq               155 drivers/infiniband/hw/mlx5/srq.c 	srq->tail    = srq->msrq.max - 1;
srq               156 drivers/infiniband/hw/mlx5/srq.c 	srq->wqe_ctr = 0;
srq               158 drivers/infiniband/hw/mlx5/srq.c 	for (i = 0; i < srq->msrq.max; i++) {
srq               159 drivers/infiniband/hw/mlx5/srq.c 		next = get_wqe(srq, i);
srq               161 drivers/infiniband/hw/mlx5/srq.c 			cpu_to_be16((i + 1) & (srq->msrq.max - 1));
srq               164 drivers/infiniband/hw/mlx5/srq.c 	mlx5_ib_dbg(dev, "srq->buf.page_shift = %d\n", srq->buf.page_shift);
srq               165 drivers/infiniband/hw/mlx5/srq.c 	in->pas = kvcalloc(srq->buf.npages, sizeof(*in->pas), GFP_KERNEL);
srq               170 drivers/infiniband/hw/mlx5/srq.c 	mlx5_fill_page_frag_array(&srq->buf, in->pas);
srq               172 drivers/infiniband/hw/mlx5/srq.c 	srq->wrid = kvmalloc_array(srq->msrq.max, sizeof(u64), GFP_KERNEL);
srq               173 drivers/infiniband/hw/mlx5/srq.c 	if (!srq->wrid) {
srq               177 drivers/infiniband/hw/mlx5/srq.c 	srq->wq_sig = 0;
srq               179 drivers/infiniband/hw/mlx5/srq.c 	in->log_page_size = srq->buf.page_shift - MLX5_ADAPTER_PAGE_SHIFT;
srq               190 drivers/infiniband/hw/mlx5/srq.c 	mlx5_frag_buf_free(dev->mdev, &srq->buf);
srq               193 drivers/infiniband/hw/mlx5/srq.c 	mlx5_db_free(dev->mdev, &srq->db);
srq               197 drivers/infiniband/hw/mlx5/srq.c static void destroy_srq_user(struct ib_pd *pd, struct mlx5_ib_srq *srq,
srq               205 drivers/infiniband/hw/mlx5/srq.c 		&srq->db);
srq               206 drivers/infiniband/hw/mlx5/srq.c 	ib_umem_release(srq->umem);
srq               210 drivers/infiniband/hw/mlx5/srq.c static void destroy_srq_kernel(struct mlx5_ib_dev *dev, struct mlx5_ib_srq *srq)
srq               212 drivers/infiniband/hw/mlx5/srq.c 	kvfree(srq->wrid);
srq               213 drivers/infiniband/hw/mlx5/srq.c 	mlx5_frag_buf_free(dev->mdev, &srq->buf);
srq               214 drivers/infiniband/hw/mlx5/srq.c 	mlx5_db_free(dev->mdev, &srq->db);
srq               222 drivers/infiniband/hw/mlx5/srq.c 	struct mlx5_ib_srq *srq = to_msrq(ib_srq);
srq               237 drivers/infiniband/hw/mlx5/srq.c 	mutex_init(&srq->mutex);
srq               238 drivers/infiniband/hw/mlx5/srq.c 	spin_lock_init(&srq->lock);
srq               239 drivers/infiniband/hw/mlx5/srq.c 	srq->msrq.max    = roundup_pow_of_two(init_attr->attr.max_wr + 1);
srq               240 drivers/infiniband/hw/mlx5/srq.c 	srq->msrq.max_gs = init_attr->attr.max_sge;
srq               243 drivers/infiniband/hw/mlx5/srq.c 		    srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg);
srq               244 drivers/infiniband/hw/mlx5/srq.c 	if (desc_size == 0 || srq->msrq.max_gs > desc_size)
srq               252 drivers/infiniband/hw/mlx5/srq.c 	srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) /
srq               254 drivers/infiniband/hw/mlx5/srq.c 	srq->msrq.wqe_shift = ilog2(desc_size);
srq               255 drivers/infiniband/hw/mlx5/srq.c 	buf_size = srq->msrq.max * desc_size;
srq               262 drivers/infiniband/hw/mlx5/srq.c 		err = create_srq_user(ib_srq->pd, srq, &in, udata, buf_size);
srq               264 drivers/infiniband/hw/mlx5/srq.c 		err = create_srq_kernel(dev, srq, &in, buf_size);
srq               272 drivers/infiniband/hw/mlx5/srq.c 	in.log_size = ilog2(srq->msrq.max);
srq               273 drivers/infiniband/hw/mlx5/srq.c 	in.wqe_shift = srq->msrq.wqe_shift - 4;
srq               274 drivers/infiniband/hw/mlx5/srq.c 	if (srq->wq_sig)
srq               300 drivers/infiniband/hw/mlx5/srq.c 	in.db_record = srq->db.dma;
srq               301 drivers/infiniband/hw/mlx5/srq.c 	err = mlx5_cmd_create_srq(dev, &srq->msrq, &in);
srq               308 drivers/infiniband/hw/mlx5/srq.c 	mlx5_ib_dbg(dev, "create SRQ with srqn 0x%x\n", srq->msrq.srqn);
srq               310 drivers/infiniband/hw/mlx5/srq.c 	srq->msrq.event = mlx5_ib_srq_event;
srq               311 drivers/infiniband/hw/mlx5/srq.c 	srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn;
srq               314 drivers/infiniband/hw/mlx5/srq.c 		if (ib_copy_to_udata(udata, &srq->msrq.srqn, sizeof(__u32))) {
srq               320 drivers/infiniband/hw/mlx5/srq.c 	init_attr->attr.max_wr = srq->msrq.max - 1;
srq               325 drivers/infiniband/hw/mlx5/srq.c 	mlx5_cmd_destroy_srq(dev, &srq->msrq);
srq               329 drivers/infiniband/hw/mlx5/srq.c 		destroy_srq_user(ib_srq->pd, srq, udata);
srq               331 drivers/infiniband/hw/mlx5/srq.c 		destroy_srq_kernel(dev, srq);
srq               340 drivers/infiniband/hw/mlx5/srq.c 	struct mlx5_ib_srq *srq = to_msrq(ibsrq);
srq               348 drivers/infiniband/hw/mlx5/srq.c 		if (attr->srq_limit >= srq->msrq.max)
srq               351 drivers/infiniband/hw/mlx5/srq.c 		mutex_lock(&srq->mutex);
srq               352 drivers/infiniband/hw/mlx5/srq.c 		ret = mlx5_cmd_arm_srq(dev, &srq->msrq, attr->srq_limit, 1);
srq               353 drivers/infiniband/hw/mlx5/srq.c 		mutex_unlock(&srq->mutex);
srq               365 drivers/infiniband/hw/mlx5/srq.c 	struct mlx5_ib_srq *srq = to_msrq(ibsrq);
srq               373 drivers/infiniband/hw/mlx5/srq.c 	ret = mlx5_cmd_query_srq(dev, &srq->msrq, out);
srq               378 drivers/infiniband/hw/mlx5/srq.c 	srq_attr->max_wr    = srq->msrq.max - 1;
srq               379 drivers/infiniband/hw/mlx5/srq.c 	srq_attr->max_sge   = srq->msrq.max_gs;
srq               386 drivers/infiniband/hw/mlx5/srq.c void mlx5_ib_destroy_srq(struct ib_srq *srq, struct ib_udata *udata)
srq               388 drivers/infiniband/hw/mlx5/srq.c 	struct mlx5_ib_dev *dev = to_mdev(srq->device);
srq               389 drivers/infiniband/hw/mlx5/srq.c 	struct mlx5_ib_srq *msrq = to_msrq(srq);
srq               393 drivers/infiniband/hw/mlx5/srq.c 	if (srq->uobject) {
srq               406 drivers/infiniband/hw/mlx5/srq.c void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int wqe_index)
srq               411 drivers/infiniband/hw/mlx5/srq.c 	spin_lock(&srq->lock);
srq               413 drivers/infiniband/hw/mlx5/srq.c 	next = get_wqe(srq, srq->tail);
srq               415 drivers/infiniband/hw/mlx5/srq.c 	srq->tail = wqe_index;
srq               417 drivers/infiniband/hw/mlx5/srq.c 	spin_unlock(&srq->lock);
srq               423 drivers/infiniband/hw/mlx5/srq.c 	struct mlx5_ib_srq *srq = to_msrq(ibsrq);
srq               433 drivers/infiniband/hw/mlx5/srq.c 	spin_lock_irqsave(&srq->lock, flags);
srq               442 drivers/infiniband/hw/mlx5/srq.c 		if (unlikely(wr->num_sge > srq->msrq.max_gs)) {
srq               448 drivers/infiniband/hw/mlx5/srq.c 		if (unlikely(srq->head == srq->tail)) {
srq               454 drivers/infiniband/hw/mlx5/srq.c 		srq->wrid[srq->head] = wr->wr_id;
srq               456 drivers/infiniband/hw/mlx5/srq.c 		next      = get_wqe(srq, srq->head);
srq               457 drivers/infiniband/hw/mlx5/srq.c 		srq->head = be16_to_cpu(next->next_wqe_index);
srq               466 drivers/infiniband/hw/mlx5/srq.c 		if (i < srq->msrq.max_avail_gather) {
srq               474 drivers/infiniband/hw/mlx5/srq.c 		srq->wqe_ctr += nreq;
srq               481 drivers/infiniband/hw/mlx5/srq.c 		*srq->db.db = cpu_to_be32(srq->wqe_ctr);
srq               484 drivers/infiniband/hw/mlx5/srq.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq                47 drivers/infiniband/hw/mlx5/srq.h 	void (*event)(struct mlx5_core_srq *srq, enum mlx5_event e);
srq                57 drivers/infiniband/hw/mlx5/srq.h int mlx5_cmd_create_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq                59 drivers/infiniband/hw/mlx5/srq.h void mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq);
srq                60 drivers/infiniband/hw/mlx5/srq.h int mlx5_cmd_query_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq                62 drivers/infiniband/hw/mlx5/srq.h int mlx5_cmd_arm_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq                84 drivers/infiniband/hw/mlx5/srq_cmd.c 	struct mlx5_core_srq *srq;
srq                87 drivers/infiniband/hw/mlx5/srq_cmd.c 	srq = xa_load(&table->array, srqn);
srq                88 drivers/infiniband/hw/mlx5/srq_cmd.c 	if (srq)
srq                89 drivers/infiniband/hw/mlx5/srq_cmd.c 		refcount_inc(&srq->common.refcount);
srq                92 drivers/infiniband/hw/mlx5/srq_cmd.c 	return srq;
srq                95 drivers/infiniband/hw/mlx5/srq_cmd.c static int create_srq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               126 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->srqn = MLX5_GET(create_srq_out, create_out, srqn);
srq               127 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->uid = in->uid;
srq               133 drivers/infiniband/hw/mlx5/srq_cmd.c static int destroy_srq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
srq               140 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_srq_in, srq_in, srqn, srq->srqn);
srq               141 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_srq_in, srq_in, uid, srq->uid);
srq               147 drivers/infiniband/hw/mlx5/srq_cmd.c static int arm_srq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               155 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(arm_rq_in, srq_in, srq_number, srq->srqn);
srq               157 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(arm_rq_in, srq_in, uid, srq->uid);
srq               163 drivers/infiniband/hw/mlx5/srq_cmd.c static int query_srq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               177 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(query_srq_in, srq_in, srqn, srq->srqn);
srq               193 drivers/infiniband/hw/mlx5/srq_cmd.c 			      struct mlx5_core_srq *srq,
srq               227 drivers/infiniband/hw/mlx5/srq_cmd.c 	srq->srqn = MLX5_GET(create_xrc_srq_out, create_out, xrc_srqn);
srq               228 drivers/infiniband/hw/mlx5/srq_cmd.c 	srq->uid = in->uid;
srq               235 drivers/infiniband/hw/mlx5/srq_cmd.c 			       struct mlx5_core_srq *srq)
srq               242 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_xrc_srq_in, xrcsrq_in, xrc_srqn, srq->srqn);
srq               243 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_xrc_srq_in, xrcsrq_in, uid, srq->uid);
srq               249 drivers/infiniband/hw/mlx5/srq_cmd.c static int arm_xrc_srq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               257 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(arm_xrc_srq_in, xrcsrq_in, xrc_srqn, srq->srqn);
srq               259 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(arm_xrc_srq_in, xrcsrq_in, uid, srq->uid);
srq               266 drivers/infiniband/hw/mlx5/srq_cmd.c 			     struct mlx5_core_srq *srq,
srq               281 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(query_xrc_srq_in, xrcsrq_in, xrc_srqn, srq->srqn);
srq               299 drivers/infiniband/hw/mlx5/srq_cmd.c static int create_rmp_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               332 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->srqn = MLX5_GET(create_rmp_out, create_out, rmpn);
srq               333 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->uid = in->uid;
srq               342 drivers/infiniband/hw/mlx5/srq_cmd.c static int destroy_rmp_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
srq               348 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_rmp_in, in, rmpn, srq->srqn);
srq               349 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_rmp_in, in, uid, srq->uid);
srq               353 drivers/infiniband/hw/mlx5/srq_cmd.c static int arm_rmp_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               380 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(modify_rmp_in, in,	 rmpn,      srq->srqn);
srq               381 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(modify_rmp_in, in, uid, srq->uid);
srq               395 drivers/infiniband/hw/mlx5/srq_cmd.c static int query_rmp_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               416 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(query_rmp_in, rmp_in, rmpn,   srq->srqn);
srq               432 drivers/infiniband/hw/mlx5/srq_cmd.c static int create_xrq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               471 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->srqn = MLX5_GET(create_xrq_out, create_out, xrqn);
srq               472 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->uid = in->uid;
srq               478 drivers/infiniband/hw/mlx5/srq_cmd.c static int destroy_xrq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
srq               484 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_xrq_in, in, xrqn,   srq->srqn);
srq               485 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(destroy_xrq_in, in, uid, srq->uid);
srq               491 drivers/infiniband/hw/mlx5/srq_cmd.c 		       struct mlx5_core_srq *srq,
srq               499 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(arm_rq_in, in, srq_number, srq->srqn);
srq               501 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(arm_rq_in, in, uid, srq->uid);
srq               506 drivers/infiniband/hw/mlx5/srq_cmd.c static int query_xrq_cmd(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               520 drivers/infiniband/hw/mlx5/srq_cmd.c 	MLX5_SET(query_xrq_in, in, xrqn, srq->srqn);
srq               545 drivers/infiniband/hw/mlx5/srq_cmd.c static int create_srq_split(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               549 drivers/infiniband/hw/mlx5/srq_cmd.c 		return create_srq_cmd(dev, srq, in);
srq               550 drivers/infiniband/hw/mlx5/srq_cmd.c 	switch (srq->common.res) {
srq               552 drivers/infiniband/hw/mlx5/srq_cmd.c 		return create_xrc_srq_cmd(dev, srq, in);
srq               554 drivers/infiniband/hw/mlx5/srq_cmd.c 		return create_xrq_cmd(dev, srq, in);
srq               556 drivers/infiniband/hw/mlx5/srq_cmd.c 		return create_rmp_cmd(dev, srq, in);
srq               560 drivers/infiniband/hw/mlx5/srq_cmd.c static int destroy_srq_split(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
srq               563 drivers/infiniband/hw/mlx5/srq_cmd.c 		return destroy_srq_cmd(dev, srq);
srq               564 drivers/infiniband/hw/mlx5/srq_cmd.c 	switch (srq->common.res) {
srq               566 drivers/infiniband/hw/mlx5/srq_cmd.c 		return destroy_xrc_srq_cmd(dev, srq);
srq               568 drivers/infiniband/hw/mlx5/srq_cmd.c 		return destroy_xrq_cmd(dev, srq);
srq               570 drivers/infiniband/hw/mlx5/srq_cmd.c 		return destroy_rmp_cmd(dev, srq);
srq               574 drivers/infiniband/hw/mlx5/srq_cmd.c int mlx5_cmd_create_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               582 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->common.res = MLX5_RES_XSRQ;
srq               585 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->common.res = MLX5_RES_XRQ;
srq               588 drivers/infiniband/hw/mlx5/srq_cmd.c 		srq->common.res = MLX5_RES_SRQ;
srq               591 drivers/infiniband/hw/mlx5/srq_cmd.c 	err = create_srq_split(dev, srq, in);
srq               595 drivers/infiniband/hw/mlx5/srq_cmd.c 	refcount_set(&srq->common.refcount, 1);
srq               596 drivers/infiniband/hw/mlx5/srq_cmd.c 	init_completion(&srq->common.free);
srq               598 drivers/infiniband/hw/mlx5/srq_cmd.c 	err = xa_err(xa_store_irq(&table->array, srq->srqn, srq, GFP_KERNEL));
srq               605 drivers/infiniband/hw/mlx5/srq_cmd.c 	destroy_srq_split(dev, srq);
srq               610 drivers/infiniband/hw/mlx5/srq_cmd.c void mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
srq               616 drivers/infiniband/hw/mlx5/srq_cmd.c 	tmp = xa_erase_irq(&table->array, srq->srqn);
srq               617 drivers/infiniband/hw/mlx5/srq_cmd.c 	if (!tmp || tmp != srq)
srq               620 drivers/infiniband/hw/mlx5/srq_cmd.c 	err = destroy_srq_split(dev, srq);
srq               624 drivers/infiniband/hw/mlx5/srq_cmd.c 	mlx5_core_res_put(&srq->common);
srq               625 drivers/infiniband/hw/mlx5/srq_cmd.c 	wait_for_completion(&srq->common.free);
srq               628 drivers/infiniband/hw/mlx5/srq_cmd.c int mlx5_cmd_query_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               632 drivers/infiniband/hw/mlx5/srq_cmd.c 		return query_srq_cmd(dev, srq, out);
srq               633 drivers/infiniband/hw/mlx5/srq_cmd.c 	switch (srq->common.res) {
srq               635 drivers/infiniband/hw/mlx5/srq_cmd.c 		return query_xrc_srq_cmd(dev, srq, out);
srq               637 drivers/infiniband/hw/mlx5/srq_cmd.c 		return query_xrq_cmd(dev, srq, out);
srq               639 drivers/infiniband/hw/mlx5/srq_cmd.c 		return query_rmp_cmd(dev, srq, out);
srq               643 drivers/infiniband/hw/mlx5/srq_cmd.c int mlx5_cmd_arm_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
srq               647 drivers/infiniband/hw/mlx5/srq_cmd.c 		return arm_srq_cmd(dev, srq, lwm, is_srq);
srq               648 drivers/infiniband/hw/mlx5/srq_cmd.c 	switch (srq->common.res) {
srq               650 drivers/infiniband/hw/mlx5/srq_cmd.c 		return arm_xrc_srq_cmd(dev, srq, lwm);
srq               652 drivers/infiniband/hw/mlx5/srq_cmd.c 		return arm_xrq_cmd(dev, srq, lwm);
srq               654 drivers/infiniband/hw/mlx5/srq_cmd.c 		return arm_rmp_cmd(dev, srq, lwm);
srq               662 drivers/infiniband/hw/mlx5/srq_cmd.c 	struct mlx5_core_srq *srq;
srq               676 drivers/infiniband/hw/mlx5/srq_cmd.c 	srq = xa_load(&table->array, srqn);
srq               677 drivers/infiniband/hw/mlx5/srq_cmd.c 	if (srq)
srq               678 drivers/infiniband/hw/mlx5/srq_cmd.c 		refcount_inc(&srq->common.refcount);
srq               681 drivers/infiniband/hw/mlx5/srq_cmd.c 	if (!srq)
srq               684 drivers/infiniband/hw/mlx5/srq_cmd.c 	srq->event(srq, eqe->type);
srq               686 drivers/infiniband/hw/mlx5/srq_cmd.c 	mlx5_core_res_put(&srq->common);
srq               274 drivers/infiniband/hw/mthca/mthca_cq.c 		    struct mthca_srq *srq)
srq               306 drivers/infiniband/hw/mthca/mthca_cq.c 			if (srq && is_recv_cqe(cqe))
srq               307 drivers/infiniband/hw/mthca/mthca_cq.c 				mthca_free_srq_wqe(srq, be32_to_cpu(cqe->wqe));
srq               539 drivers/infiniband/hw/mthca/mthca_cq.c 	} else if ((*cur_qp)->ibqp.srq) {
srq               540 drivers/infiniband/hw/mthca/mthca_cq.c 		struct mthca_srq *srq = to_msrq((*cur_qp)->ibqp.srq);
srq               543 drivers/infiniband/hw/mthca/mthca_cq.c 		wqe_index = wqe >> srq->wqe_shift;
srq               544 drivers/infiniband/hw/mthca/mthca_cq.c 		entry->wr_id = srq->wrid[wqe_index];
srq               545 drivers/infiniband/hw/mthca/mthca_cq.c 		mthca_free_srq_wqe(srq, wqe);
srq               249 drivers/infiniband/hw/mthca/mthca_dev.h 	struct mthca_array      srq;
srq               507 drivers/infiniband/hw/mthca/mthca_dev.h 		    struct mthca_srq *srq);
srq               513 drivers/infiniband/hw/mthca/mthca_dev.h 		    struct ib_srq_attr *attr, struct mthca_srq *srq,
srq               515 drivers/infiniband/hw/mthca/mthca_dev.h void mthca_free_srq(struct mthca_dev *dev, struct mthca_srq *srq);
srq               518 drivers/infiniband/hw/mthca/mthca_dev.h int mthca_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
srq               522 drivers/infiniband/hw/mthca/mthca_dev.h void mthca_free_srq_wqe(struct mthca_srq *srq, u32 wqe_addr);
srq               523 drivers/infiniband/hw/mthca/mthca_dev.h int mthca_tavor_post_srq_recv(struct ib_srq *srq, const struct ib_recv_wr *wr,
srq               525 drivers/infiniband/hw/mthca/mthca_dev.h int mthca_arbel_post_srq_recv(struct ib_srq *srq, const struct ib_recv_wr *wr,
srq               147 drivers/infiniband/hw/mthca/mthca_eq.c 		} __packed srq;
srq               302 drivers/infiniband/hw/mthca/mthca_eq.c 			mthca_srq_event(dev, be32_to_cpu(eqe->event.srq.srqn) & 0xffffff,
srq               413 drivers/infiniband/hw/mthca/mthca_provider.c 	struct mthca_srq *srq = to_msrq(ibsrq);
srq               430 drivers/infiniband/hw/mthca/mthca_provider.c 		srq->mr.ibmr.lkey = ucmd.lkey;
srq               431 drivers/infiniband/hw/mthca/mthca_provider.c 		srq->db_index     = ucmd.db_index;
srq               435 drivers/infiniband/hw/mthca/mthca_provider.c 			      &init_attr->attr, srq, udata);
srq               444 drivers/infiniband/hw/mthca/mthca_provider.c 	if (context && ib_copy_to_udata(udata, &srq->srqn, sizeof(__u32))) {
srq               445 drivers/infiniband/hw/mthca/mthca_provider.c 		mthca_free_srq(to_mdev(ibsrq->device), srq);
srq               452 drivers/infiniband/hw/mthca/mthca_provider.c static void mthca_destroy_srq(struct ib_srq *srq, struct ib_udata *udata)
srq               461 drivers/infiniband/hw/mthca/mthca_provider.c 		mthca_unmap_user_db(to_mdev(srq->device), &context->uar,
srq               462 drivers/infiniband/hw/mthca/mthca_provider.c 				    context->db_tab, to_msrq(srq)->db_index);
srq               465 drivers/infiniband/hw/mthca/mthca_provider.c 	mthca_free_srq(to_mdev(srq->device), to_msrq(srq));
srq               759 drivers/infiniband/hw/mthca/mthca_qp.c 	if (ibqp->srq)
srq               784 drivers/infiniband/hw/mthca/mthca_qp.c 	if (ibqp->srq)
srq               786 drivers/infiniband/hw/mthca/mthca_qp.c 					       to_msrq(ibqp->srq)->srqn);
srq               836 drivers/infiniband/hw/mthca/mthca_qp.c 			       qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
srq              1478 drivers/infiniband/hw/mthca/mthca_qp.c 			       qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
srq              2240 drivers/infiniband/hw/mthca/mthca_qp.c 	if (qp->ibqp.srq && !is_send) {
srq                74 drivers/infiniband/hw/mthca/mthca_srq.c static void *get_wqe(struct mthca_srq *srq, int n)
srq                76 drivers/infiniband/hw/mthca/mthca_srq.c 	if (srq->is_direct)
srq                77 drivers/infiniband/hw/mthca/mthca_srq.c 		return srq->queue.direct.buf + (n << srq->wqe_shift);
srq                79 drivers/infiniband/hw/mthca/mthca_srq.c 		return srq->queue.page_list[(n << srq->wqe_shift) >> PAGE_SHIFT].buf +
srq                80 drivers/infiniband/hw/mthca/mthca_srq.c 			((n << srq->wqe_shift) & (PAGE_SIZE - 1));
srq                99 drivers/infiniband/hw/mthca/mthca_srq.c 					 struct mthca_srq *srq,
srq               108 drivers/infiniband/hw/mthca/mthca_srq.c 	context->wqe_base_ds = cpu_to_be64(1 << (srq->wqe_shift - 4));
srq               110 drivers/infiniband/hw/mthca/mthca_srq.c 	context->lkey        = cpu_to_be32(srq->mr.ibmr.lkey);
srq               120 drivers/infiniband/hw/mthca/mthca_srq.c 					 struct mthca_srq *srq,
srq               134 drivers/infiniband/hw/mthca/mthca_srq.c 	max = srq->max;
srq               136 drivers/infiniband/hw/mthca/mthca_srq.c 	context->state_logsize_srqn = cpu_to_be32(logsize << 24 | srq->srqn);
srq               137 drivers/infiniband/hw/mthca/mthca_srq.c 	context->lkey = cpu_to_be32(srq->mr.ibmr.lkey);
srq               138 drivers/infiniband/hw/mthca/mthca_srq.c 	context->db_index = cpu_to_be32(srq->db_index);
srq               139 drivers/infiniband/hw/mthca/mthca_srq.c 	context->logstride_usrpage = cpu_to_be32((srq->wqe_shift - 4) << 29);
srq               147 drivers/infiniband/hw/mthca/mthca_srq.c static void mthca_free_srq_buf(struct mthca_dev *dev, struct mthca_srq *srq)
srq               149 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_buf_free(dev, srq->max << srq->wqe_shift, &srq->queue,
srq               150 drivers/infiniband/hw/mthca/mthca_srq.c 		       srq->is_direct, &srq->mr);
srq               151 drivers/infiniband/hw/mthca/mthca_srq.c 	kfree(srq->wrid);
srq               155 drivers/infiniband/hw/mthca/mthca_srq.c 			       struct mthca_srq *srq, struct ib_udata *udata)
srq               165 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->wrid = kmalloc_array(srq->max, sizeof(u64), GFP_KERNEL);
srq               166 drivers/infiniband/hw/mthca/mthca_srq.c 	if (!srq->wrid)
srq               169 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_buf_alloc(dev, srq->max << srq->wqe_shift,
srq               171 drivers/infiniband/hw/mthca/mthca_srq.c 			      &srq->queue, &srq->is_direct, pd, 1, &srq->mr);
srq               173 drivers/infiniband/hw/mthca/mthca_srq.c 		kfree(srq->wrid);
srq               182 drivers/infiniband/hw/mthca/mthca_srq.c 	for (i = 0; i < srq->max; ++i) {
srq               185 drivers/infiniband/hw/mthca/mthca_srq.c 		next = wqe = get_wqe(srq, i);
srq               187 drivers/infiniband/hw/mthca/mthca_srq.c 		if (i < srq->max - 1) {
srq               189 drivers/infiniband/hw/mthca/mthca_srq.c 			next->nda_op = htonl(((i + 1) << srq->wqe_shift) | 1);
srq               196 drivers/infiniband/hw/mthca/mthca_srq.c 		     (void *) scatter < wqe + (1 << srq->wqe_shift);
srq               201 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->last = get_wqe(srq, srq->max - 1);
srq               207 drivers/infiniband/hw/mthca/mthca_srq.c 		    struct ib_srq_attr *attr, struct mthca_srq *srq,
srq               219 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->max      = attr->max_wr;
srq               220 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->max_gs   = attr->max_sge;
srq               221 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->counter  = 0;
srq               224 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->max = roundup_pow_of_two(srq->max + 1);
srq               226 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->max = srq->max + 1;
srq               230 drivers/infiniband/hw/mthca/mthca_srq.c 				    srq->max_gs * sizeof (struct mthca_data_seg)));
srq               235 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->wqe_shift = ilog2(ds);
srq               237 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->srqn = mthca_alloc(&dev->srq_table.alloc);
srq               238 drivers/infiniband/hw/mthca/mthca_srq.c 	if (srq->srqn == -1)
srq               242 drivers/infiniband/hw/mthca/mthca_srq.c 		err = mthca_table_get(dev, dev->srq_table.table, srq->srqn);
srq               247 drivers/infiniband/hw/mthca/mthca_srq.c 			srq->db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_SRQ,
srq               248 drivers/infiniband/hw/mthca/mthca_srq.c 						       srq->srqn, &srq->db);
srq               249 drivers/infiniband/hw/mthca/mthca_srq.c 			if (srq->db_index < 0) {
srq               262 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_alloc_srq_buf(dev, pd, srq, udata);
srq               266 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_lock_init(&srq->lock);
srq               267 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->refcount = 1;
srq               268 drivers/infiniband/hw/mthca/mthca_srq.c 	init_waitqueue_head(&srq->wait);
srq               269 drivers/infiniband/hw/mthca/mthca_srq.c 	mutex_init(&srq->mutex);
srq               272 drivers/infiniband/hw/mthca/mthca_srq.c 		mthca_arbel_init_srq_context(dev, pd, srq, mailbox->buf, udata);
srq               274 drivers/infiniband/hw/mthca/mthca_srq.c 		mthca_tavor_init_srq_context(dev, pd, srq, mailbox->buf, udata);
srq               276 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_SW2HW_SRQ(dev, mailbox, srq->srqn);
srq               284 drivers/infiniband/hw/mthca/mthca_srq.c 	if (mthca_array_set(&dev->srq_table.srq,
srq               285 drivers/infiniband/hw/mthca/mthca_srq.c 			    srq->srqn & (dev->limits.num_srqs - 1),
srq               286 drivers/infiniband/hw/mthca/mthca_srq.c 			    srq)) {
srq               294 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->first_free = 0;
srq               295 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->last_free  = srq->max - 1;
srq               297 drivers/infiniband/hw/mthca/mthca_srq.c 	attr->max_wr    = srq->max - 1;
srq               298 drivers/infiniband/hw/mthca/mthca_srq.c 	attr->max_sge   = srq->max_gs;
srq               303 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_HW2SW_SRQ(dev, mailbox, srq->srqn);
srq               309 drivers/infiniband/hw/mthca/mthca_srq.c 		mthca_free_srq_buf(dev, srq);
srq               316 drivers/infiniband/hw/mthca/mthca_srq.c 		mthca_free_db(dev, MTHCA_DB_TYPE_SRQ, srq->db_index);
srq               319 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_table_put(dev, dev->srq_table.table, srq->srqn);
srq               322 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_free(&dev->srq_table.alloc, srq->srqn);
srq               327 drivers/infiniband/hw/mthca/mthca_srq.c static inline int get_srq_refcount(struct mthca_dev *dev, struct mthca_srq *srq)
srq               332 drivers/infiniband/hw/mthca/mthca_srq.c 	c = srq->refcount;
srq               338 drivers/infiniband/hw/mthca/mthca_srq.c void mthca_free_srq(struct mthca_dev *dev, struct mthca_srq *srq)
srq               349 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_HW2SW_SRQ(dev, mailbox, srq->srqn);
srq               354 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_array_clear(&dev->srq_table.srq,
srq               355 drivers/infiniband/hw/mthca/mthca_srq.c 			  srq->srqn & (dev->limits.num_srqs - 1));
srq               356 drivers/infiniband/hw/mthca/mthca_srq.c 	--srq->refcount;
srq               359 drivers/infiniband/hw/mthca/mthca_srq.c 	wait_event(srq->wait, !get_srq_refcount(dev, srq));
srq               361 drivers/infiniband/hw/mthca/mthca_srq.c 	if (!srq->ibsrq.uobject) {
srq               362 drivers/infiniband/hw/mthca/mthca_srq.c 		mthca_free_srq_buf(dev, srq);
srq               364 drivers/infiniband/hw/mthca/mthca_srq.c 			mthca_free_db(dev, MTHCA_DB_TYPE_SRQ, srq->db_index);
srq               367 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_table_put(dev, dev->srq_table.table, srq->srqn);
srq               368 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_free(&dev->srq_table.alloc, srq->srqn);
srq               376 drivers/infiniband/hw/mthca/mthca_srq.c 	struct mthca_srq *srq = to_msrq(ibsrq);
srq               384 drivers/infiniband/hw/mthca/mthca_srq.c 		u32 max_wr = mthca_is_memfree(dev) ? srq->max - 1 : srq->max;
srq               388 drivers/infiniband/hw/mthca/mthca_srq.c 		mutex_lock(&srq->mutex);
srq               389 drivers/infiniband/hw/mthca/mthca_srq.c 		ret = mthca_ARM_SRQ(dev, srq->srqn, attr->srq_limit);
srq               390 drivers/infiniband/hw/mthca/mthca_srq.c 		mutex_unlock(&srq->mutex);
srq               399 drivers/infiniband/hw/mthca/mthca_srq.c 	struct mthca_srq *srq = to_msrq(ibsrq);
srq               409 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_QUERY_SRQ(dev, srq->srqn, mailbox);
srq               421 drivers/infiniband/hw/mthca/mthca_srq.c 	srq_attr->max_wr  = srq->max - 1;
srq               422 drivers/infiniband/hw/mthca/mthca_srq.c 	srq_attr->max_sge = srq->max_gs;
srq               433 drivers/infiniband/hw/mthca/mthca_srq.c 	struct mthca_srq *srq;
srq               437 drivers/infiniband/hw/mthca/mthca_srq.c 	srq = mthca_array_get(&dev->srq_table.srq, srqn & (dev->limits.num_srqs - 1));
srq               438 drivers/infiniband/hw/mthca/mthca_srq.c 	if (srq)
srq               439 drivers/infiniband/hw/mthca/mthca_srq.c 		++srq->refcount;
srq               442 drivers/infiniband/hw/mthca/mthca_srq.c 	if (!srq) {
srq               447 drivers/infiniband/hw/mthca/mthca_srq.c 	if (!srq->ibsrq.event_handler)
srq               452 drivers/infiniband/hw/mthca/mthca_srq.c 	event.element.srq = &srq->ibsrq;
srq               453 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->ibsrq.event_handler(&event, srq->ibsrq.srq_context);
srq               457 drivers/infiniband/hw/mthca/mthca_srq.c 	if (!--srq->refcount)
srq               458 drivers/infiniband/hw/mthca/mthca_srq.c 		wake_up(&srq->wait);
srq               465 drivers/infiniband/hw/mthca/mthca_srq.c void mthca_free_srq_wqe(struct mthca_srq *srq, u32 wqe_addr)
srq               470 drivers/infiniband/hw/mthca/mthca_srq.c 	ind = wqe_addr >> srq->wqe_shift;
srq               472 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_lock(&srq->lock);
srq               474 drivers/infiniband/hw/mthca/mthca_srq.c 	last_free = get_wqe(srq, srq->last_free);
srq               476 drivers/infiniband/hw/mthca/mthca_srq.c 	last_free->nda_op = htonl((ind << srq->wqe_shift) | 1);
srq               477 drivers/infiniband/hw/mthca/mthca_srq.c 	*wqe_to_link(get_wqe(srq, ind)) = -1;
srq               478 drivers/infiniband/hw/mthca/mthca_srq.c 	srq->last_free = ind;
srq               480 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_unlock(&srq->lock);
srq               487 drivers/infiniband/hw/mthca/mthca_srq.c 	struct mthca_srq *srq = to_msrq(ibsrq);
srq               498 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_lock_irqsave(&srq->lock, flags);
srq               500 drivers/infiniband/hw/mthca/mthca_srq.c 	first_ind = srq->first_free;
srq               503 drivers/infiniband/hw/mthca/mthca_srq.c 		ind       = srq->first_free;
srq               504 drivers/infiniband/hw/mthca/mthca_srq.c 		wqe       = get_wqe(srq, ind);
srq               508 drivers/infiniband/hw/mthca/mthca_srq.c 			mthca_err(dev, "SRQ %06x full\n", srq->srqn);
srq               514 drivers/infiniband/hw/mthca/mthca_srq.c 		prev_wqe  = srq->last;
srq               515 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->last = wqe;
srq               522 drivers/infiniband/hw/mthca/mthca_srq.c 		if (unlikely(wr->num_sge > srq->max_gs)) {
srq               525 drivers/infiniband/hw/mthca/mthca_srq.c 			srq->last = prev_wqe;
srq               534 drivers/infiniband/hw/mthca/mthca_srq.c 		if (i < srq->max_gs)
srq               540 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->wrid[ind]  = wr->wr_id;
srq               541 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->first_free = next_ind;
srq               553 drivers/infiniband/hw/mthca/mthca_srq.c 			mthca_write64(first_ind << srq->wqe_shift, srq->srqn << 8,
srq               557 drivers/infiniband/hw/mthca/mthca_srq.c 			first_ind = srq->first_free;
srq               568 drivers/infiniband/hw/mthca/mthca_srq.c 		mthca_write64(first_ind << srq->wqe_shift, (srq->srqn << 8) | nreq,
srq               573 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq               581 drivers/infiniband/hw/mthca/mthca_srq.c 	struct mthca_srq *srq = to_msrq(ibsrq);
srq               590 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_lock_irqsave(&srq->lock, flags);
srq               593 drivers/infiniband/hw/mthca/mthca_srq.c 		ind       = srq->first_free;
srq               594 drivers/infiniband/hw/mthca/mthca_srq.c 		wqe       = get_wqe(srq, ind);
srq               598 drivers/infiniband/hw/mthca/mthca_srq.c 			mthca_err(dev, "SRQ %06x full\n", srq->srqn);
srq               609 drivers/infiniband/hw/mthca/mthca_srq.c 		if (unlikely(wr->num_sge > srq->max_gs)) {
srq               620 drivers/infiniband/hw/mthca/mthca_srq.c 		if (i < srq->max_gs)
srq               623 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->wrid[ind]  = wr->wr_id;
srq               624 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->first_free = next_ind;
srq               628 drivers/infiniband/hw/mthca/mthca_srq.c 		srq->counter += nreq;
srq               635 drivers/infiniband/hw/mthca/mthca_srq.c 		*srq->db = cpu_to_be32(srq->counter);
srq               638 drivers/infiniband/hw/mthca/mthca_srq.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq               683 drivers/infiniband/hw/mthca/mthca_srq.c 	err = mthca_array_init(&dev->srq_table.srq,
srq               696 drivers/infiniband/hw/mthca/mthca_srq.c 	mthca_array_cleanup(&dev->srq_table.srq, dev->limits.num_srqs);
srq               414 drivers/infiniband/hw/ocrdma/ocrdma.h 	struct ocrdma_srq *srq;
srq               756 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		ib_evt.element.srq = &qp->srq->ibsrq;
srq               762 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		ib_evt.element.srq = &qp->srq->ibsrq;
srq               790 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		if (qp->srq->ibsrq.event_handler)
srq               791 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 			qp->srq->ibsrq.event_handler(&ib_evt,
srq               792 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 						     qp->srq->ibsrq.
srq               916 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		if (qp->srq)
srq              2118 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	if (!qp->srq) {
srq              2361 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	if (!attrs->srq) {
srq              2404 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	if (attrs->srq) {
srq              2405 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		struct ocrdma_srq *srq = get_ocrdma_srq(attrs->srq);
srq              2407 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		cmd->rq_addr[0].lo = srq->id;
srq              2408 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		qp->srq = srq;
srq              2736 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	if (!qp->srq && qp->rq.va)
srq              2743 drivers/infiniband/hw/ocrdma/ocrdma_hw.c int ocrdma_mbx_create_srq(struct ocrdma_dev *dev, struct ocrdma_srq *srq,
srq              2772 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.va = dma_alloc_coherent(&pdev->dev, len, &pa, GFP_KERNEL);
srq              2773 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	if (!srq->rq.va) {
srq              2779 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.entry_size = dev->attr.rqe_size;
srq              2780 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.pa = pa;
srq              2781 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.len = len;
srq              2782 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.max_cnt = max_rqe_allocated;
srq              2799 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->id = rsp->id;
srq              2800 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.dbid = rsp->id;
srq              2805 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.max_cnt = max_rqe_allocated;
srq              2806 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.max_wqe_idx = max_rqe_allocated - 1;
srq              2807 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	srq->rq.max_sges = (rsp->max_sge_rqe_allocated &
srq              2812 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	dma_free_coherent(&pdev->dev, srq->rq.len, srq->rq.va, pa);
srq              2818 drivers/infiniband/hw/ocrdma/ocrdma_hw.c int ocrdma_mbx_modify_srq(struct ocrdma_srq *srq, struct ib_srq_attr *srq_attr)
srq              2822 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	struct ocrdma_pd *pd = srq->pd;
srq              2828 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	cmd->id = srq->id;
srq              2836 drivers/infiniband/hw/ocrdma/ocrdma_hw.c int ocrdma_mbx_query_srq(struct ocrdma_srq *srq, struct ib_srq_attr *srq_attr)
srq              2840 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	struct ocrdma_dev *dev = get_ocrdma_dev(srq->ibsrq.device);
srq              2845 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	cmd->id = srq->rq.dbid;
srq              2862 drivers/infiniband/hw/ocrdma/ocrdma_hw.c void ocrdma_mbx_destroy_srq(struct ocrdma_dev *dev, struct ocrdma_srq *srq)
srq              2869 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	cmd->id = srq->id;
srq              2871 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 	if (srq->rq.va)
srq              2872 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 		dma_free_coherent(&pdev->dev, srq->rq.len,
srq              2873 drivers/infiniband/hw/ocrdma/ocrdma_hw.c 				  srq->rq.va, srq->rq.pa);
srq               140 drivers/infiniband/hw/ocrdma/ocrdma_hw.h void ocrdma_mbx_destroy_srq(struct ocrdma_dev *dev, struct ocrdma_srq *srq);
srq              1131 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	if (!attrs->srq && (attrs->cap.max_recv_wr > dev->attr.max_rqe)) {
srq              1186 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 				int dpp_credit_lmt, int srq)
srq              1203 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	if (!srq) {
srq              1230 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	if (!srq) {
srq              1357 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 					      (attrs->srq != NULL));
srq              1556 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c static void ocrdma_srq_toggle_bit(struct ocrdma_srq *srq, unsigned int idx)
srq              1561 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq->idx_bit_fields[i] ^= mask;
srq              1623 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (is_hw_sq_empty(qp) && (!qp->srq && is_hw_rq_empty(qp)))
srq              1640 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 			if (qp->srq) {
srq              1643 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 					qp->srq->rq.max_wqe_idx;
srq              1645 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 				spin_lock_irqsave(&qp->srq->q_lock, flags);
srq              1646 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 				ocrdma_hwq_inc_tail(&qp->srq->rq);
srq              1647 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 				ocrdma_srq_toggle_bit(qp->srq, wqe_idx - 1);
srq              1648 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 				spin_unlock_irqrestore(&qp->srq->q_lock, flags);
srq              1676 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	if (!qp->srq) {
srq              1734 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (!qp->srq)
srq              1747 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c static int ocrdma_copy_srq_uresp(struct ocrdma_dev *dev, struct ocrdma_srq *srq,
srq              1754 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	uresp.rq_dbid = srq->rq.dbid;
srq              1756 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	uresp.rq_page_addr[0] = virt_to_phys(srq->rq.va);
srq              1757 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	uresp.rq_page_size = srq->rq.len;
srq              1759 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	    (srq->pd->id * dev->nic_info.db_page_size);
srq              1761 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	uresp.num_rqe_allocated = srq->rq.max_cnt;
srq              1773 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	status = ocrdma_add_mmap(srq->pd->uctx, uresp.rq_page_addr[0],
srq              1786 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	struct ocrdma_srq *srq = get_ocrdma_srq(ibsrq);
srq              1793 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	spin_lock_init(&srq->q_lock);
srq              1794 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq->pd = pd;
srq              1795 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq->db = dev->nic_info.db + (pd->id * dev->nic_info.db_page_size);
srq              1796 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	status = ocrdma_mbx_create_srq(dev, srq, init_attr, pd);
srq              1801 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		srq->rqe_wr_id_tbl = kcalloc(srq->rq.max_cnt, sizeof(u64),
srq              1803 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (!srq->rqe_wr_id_tbl) {
srq              1808 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		srq->bit_fields_len = (srq->rq.max_cnt / 32) +
srq              1809 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		    (srq->rq.max_cnt % 32 ? 1 : 0);
srq              1810 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		srq->idx_bit_fields =
srq              1811 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		    kmalloc_array(srq->bit_fields_len, sizeof(u32),
srq              1813 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (!srq->idx_bit_fields) {
srq              1817 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		memset(srq->idx_bit_fields, 0xff,
srq              1818 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		       srq->bit_fields_len * sizeof(u32));
srq              1822 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		status = ocrdma_mbx_modify_srq(srq, &init_attr->attr);
srq              1828 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		status = ocrdma_copy_srq_uresp(dev, srq, udata);
srq              1836 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	ocrdma_mbx_destroy_srq(dev, srq);
srq              1837 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	kfree(srq->rqe_wr_id_tbl);
srq              1838 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	kfree(srq->idx_bit_fields);
srq              1848 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	struct ocrdma_srq *srq;
srq              1850 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq = get_ocrdma_srq(ibsrq);
srq              1854 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		status = ocrdma_mbx_modify_srq(srq, srq_attr);
srq              1861 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	struct ocrdma_srq *srq;
srq              1863 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq = get_ocrdma_srq(ibsrq);
srq              1864 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	status = ocrdma_mbx_query_srq(srq, srq_attr);
srq              1870 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	struct ocrdma_srq *srq;
srq              1873 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq = get_ocrdma_srq(ibsrq);
srq              1875 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	ocrdma_mbx_destroy_srq(dev, srq);
srq              1877 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	if (srq->pd->uctx)
srq              1878 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		ocrdma_del_mmap(srq->pd->uctx, (u64) srq->rq.pa,
srq              1879 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 				PAGE_ALIGN(srq->rq.len));
srq              1881 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	kfree(srq->idx_bit_fields);
srq              1882 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	kfree(srq->rqe_wr_id_tbl);
srq              2278 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c static int ocrdma_srq_get_idx(struct ocrdma_srq *srq)
srq              2283 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	for (row = 0; row < srq->bit_fields_len; row++) {
srq              2284 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (srq->idx_bit_fields[row]) {
srq              2285 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 			indx = ffs(srq->idx_bit_fields[row]);
srq              2287 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 			BUG_ON(indx >= srq->rq.max_cnt);
srq              2288 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 			ocrdma_srq_toggle_bit(srq, indx);
srq              2293 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	BUG_ON(row == srq->bit_fields_len);
srq              2297 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c static void ocrdma_ring_srq_db(struct ocrdma_srq *srq)
srq              2299 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	u32 val = srq->rq.dbid | (1 << 16);
srq              2301 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	iowrite32(val, srq->db + OCRDMA_DB_GEN2_SRQ_OFFSET);
srq              2309 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	struct ocrdma_srq *srq;
srq              2313 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq = get_ocrdma_srq(ibsrq);
srq              2315 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	spin_lock_irqsave(&srq->q_lock, flags);
srq              2317 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (ocrdma_hwq_free_cnt(&srq->rq) == 0 ||
srq              2318 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		    wr->num_sge > srq->rq.max_sges) {
srq              2323 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		tag = ocrdma_srq_get_idx(srq);
srq              2324 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		rqe = ocrdma_hwq_head(&srq->rq);
srq              2327 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		srq->rqe_wr_id_tbl[tag] = wr->wr_id;
srq              2331 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		ocrdma_ring_srq_db(srq);
srq              2333 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		ocrdma_hwq_inc_head(&srq->rq);
srq              2336 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	spin_unlock_irqrestore(&srq->q_lock, flags);
srq              2545 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (!qp->srq && (qp->sq_cq == qp->rq_cq)) {
srq              2645 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	struct ocrdma_srq *srq;
srq              2648 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	srq = get_ocrdma_srq(qp->ibqp.srq);
srq              2650 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		OCRDMA_CQE_BUFTAG_SHIFT) & srq->rq.max_wqe_idx;
srq              2653 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	ibwc->wr_id = srq->rqe_wr_id_tbl[wqe_idx];
srq              2654 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	spin_lock_irqsave(&srq->q_lock, flags);
srq              2655 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	ocrdma_srq_toggle_bit(srq, wqe_idx - 1);
srq              2656 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	spin_unlock_irqrestore(&srq->q_lock, flags);
srq              2657 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	ocrdma_hwq_inc_tail(&srq->rq);
srq              2674 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 		if (!qp->srq && (qp->sq_cq == qp->rq_cq)) {
srq              2721 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 	if (qp->ibqp.srq) {
srq                92 drivers/infiniband/hw/ocrdma/ocrdma_verbs.h int ocrdma_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *attr,
srq               670 drivers/infiniband/hw/qedr/main.c 	struct qedr_srq *srq;
srq               763 drivers/infiniband/hw/qedr/main.c 		srq = xa_load(&dev->srqs, srq_id);
srq               764 drivers/infiniband/hw/qedr/main.c 		if (srq) {
srq               765 drivers/infiniband/hw/qedr/main.c 			ibsrq = &srq->ibsrq;
srq               768 drivers/infiniband/hw/qedr/main.c 				event.element.srq = ibsrq;
srq               778 drivers/infiniband/hw/qedr/main.c 		DP_NOTICE(dev, "SRQ event %d on handle %p\n", e_code, srq);
srq               404 drivers/infiniband/hw/qedr/qedr.h 	struct qedr_srq *srq;
srq                97 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq *srq = get_qedr_srq(ibsrq);
srq                99 drivers/infiniband/hw/qedr/verbs.c 	srq_attr->srq_limit = srq->srq_limit;
srq              1125 drivers/infiniband/hw/qedr/verbs.c 			       struct qedr_srq *srq, struct ib_udata *udata)
srq              1130 drivers/infiniband/hw/qedr/verbs.c 	uresp.srq_id = srq->srq_id;
srq              1210 drivers/infiniband/hw/qedr/verbs.c 	if (attrs->srq) {
srq              1211 drivers/infiniband/hw/qedr/verbs.c 		qp->srq = get_qedr_srq(attrs->srq);
srq              1223 drivers/infiniband/hw/qedr/verbs.c 		 qp->state, qp->signaled, (attrs->srq) ? 1 : 0);
srq              1234 drivers/infiniband/hw/qedr/verbs.c 	if (!qp->srq) {
srq              1264 drivers/infiniband/hw/qedr/verbs.c static void qedr_free_srq_user_params(struct qedr_srq *srq)
srq              1266 drivers/infiniband/hw/qedr/verbs.c 	qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl);
srq              1267 drivers/infiniband/hw/qedr/verbs.c 	ib_umem_release(srq->usrq.umem);
srq              1268 drivers/infiniband/hw/qedr/verbs.c 	ib_umem_release(srq->prod_umem);
srq              1271 drivers/infiniband/hw/qedr/verbs.c static void qedr_free_srq_kernel_params(struct qedr_srq *srq)
srq              1273 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq_hwq_info *hw_srq = &srq->hw_srq;
srq              1274 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_dev *dev = srq->dev;
srq              1284 drivers/infiniband/hw/qedr/verbs.c 				     struct qedr_srq *srq,
srq              1291 drivers/infiniband/hw/qedr/verbs.c 	rc = qedr_init_user_queue(udata, srq->dev, &srq->usrq, ureq->srq_addr,
srq              1296 drivers/infiniband/hw/qedr/verbs.c 	srq->prod_umem =
srq              1299 drivers/infiniband/hw/qedr/verbs.c 	if (IS_ERR(srq->prod_umem)) {
srq              1300 drivers/infiniband/hw/qedr/verbs.c 		qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl);
srq              1301 drivers/infiniband/hw/qedr/verbs.c 		ib_umem_release(srq->usrq.umem);
srq              1302 drivers/infiniband/hw/qedr/verbs.c 		DP_ERR(srq->dev,
srq              1304 drivers/infiniband/hw/qedr/verbs.c 		       PTR_ERR(srq->prod_umem));
srq              1305 drivers/infiniband/hw/qedr/verbs.c 		return PTR_ERR(srq->prod_umem);
srq              1308 drivers/infiniband/hw/qedr/verbs.c 	sg = srq->prod_umem->sg_head.sgl;
srq              1309 drivers/infiniband/hw/qedr/verbs.c 	srq->hw_srq.phy_prod_pair_addr = sg_dma_address(sg);
srq              1314 drivers/infiniband/hw/qedr/verbs.c static int qedr_alloc_srq_kernel_params(struct qedr_srq *srq,
srq              1318 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq_hwq_info *hw_srq = &srq->hw_srq;
srq              1369 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq *srq = get_qedr_srq(ibsrq);
srq              1380 drivers/infiniband/hw/qedr/verbs.c 	srq->dev = dev;
srq              1381 drivers/infiniband/hw/qedr/verbs.c 	hw_srq = &srq->hw_srq;
srq              1382 drivers/infiniband/hw/qedr/verbs.c 	spin_lock_init(&srq->lock);
srq              1394 drivers/infiniband/hw/qedr/verbs.c 		rc = qedr_init_srq_user_params(udata, srq, &ureq, 0, 0);
srq              1398 drivers/infiniband/hw/qedr/verbs.c 		page_cnt = srq->usrq.pbl_info.num_pbes;
srq              1399 drivers/infiniband/hw/qedr/verbs.c 		pbl_base_addr = srq->usrq.pbl_tbl->pa;
srq              1405 drivers/infiniband/hw/qedr/verbs.c 		rc = qedr_alloc_srq_kernel_params(srq, dev, init_attr);
srq              1426 drivers/infiniband/hw/qedr/verbs.c 	srq->srq_id = out_params.srq_id;
srq              1429 drivers/infiniband/hw/qedr/verbs.c 		rc = qedr_copy_srq_uresp(dev, srq, udata);
srq              1434 drivers/infiniband/hw/qedr/verbs.c 	rc = xa_insert_irq(&dev->srqs, srq->srq_id, srq, GFP_KERNEL);
srq              1439 drivers/infiniband/hw/qedr/verbs.c 		 "create srq: created srq with srq_id=0x%0x\n", srq->srq_id);
srq              1443 drivers/infiniband/hw/qedr/verbs.c 	destroy_in_params.srq_id = srq->srq_id;
srq              1448 drivers/infiniband/hw/qedr/verbs.c 		qedr_free_srq_user_params(srq);
srq              1450 drivers/infiniband/hw/qedr/verbs.c 		qedr_free_srq_kernel_params(srq);
srq              1459 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq *srq = get_qedr_srq(ibsrq);
srq              1461 drivers/infiniband/hw/qedr/verbs.c 	xa_erase_irq(&dev->srqs, srq->srq_id);
srq              1462 drivers/infiniband/hw/qedr/verbs.c 	in_params.srq_id = srq->srq_id;
srq              1466 drivers/infiniband/hw/qedr/verbs.c 		qedr_free_srq_user_params(srq);
srq              1468 drivers/infiniband/hw/qedr/verbs.c 		qedr_free_srq_kernel_params(srq);
srq              1472 drivers/infiniband/hw/qedr/verbs.c 		 srq->srq_id);
srq              1480 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq *srq = get_qedr_srq(ibsrq);
srq              1486 drivers/infiniband/hw/qedr/verbs.c 		       attr_mask, srq);
srq              1491 drivers/infiniband/hw/qedr/verbs.c 		if (attr->srq_limit >= srq->hw_srq.max_wr) {
srq              1494 drivers/infiniband/hw/qedr/verbs.c 			       attr->srq_limit, srq->hw_srq.max_wr);
srq              1498 drivers/infiniband/hw/qedr/verbs.c 		in_params.srq_id = srq->srq_id;
srq              1505 drivers/infiniband/hw/qedr/verbs.c 	srq->srq_limit = attr->srq_limit;
srq              1508 drivers/infiniband/hw/qedr/verbs.c 		 "modify srq: modified srq with srq_id=0x%0x\n", srq->srq_id);
srq              1534 drivers/infiniband/hw/qedr/verbs.c 	if (!qp->srq) {
srq              1539 drivers/infiniband/hw/qedr/verbs.c 		params->srq_id = qp->srq->srq_id;
srq              1568 drivers/infiniband/hw/qedr/verbs.c 	if (!qp->srq) {
srq              1621 drivers/infiniband/hw/qedr/verbs.c 	if (!qp->srq) {
srq              1635 drivers/infiniband/hw/qedr/verbs.c 	if (!qp->srq) {
srq              3471 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq *srq = get_qedr_srq(ibsrq);
srq              3473 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_dev *dev = srq->dev;
srq              3480 drivers/infiniband/hw/qedr/verbs.c 	spin_lock_irqsave(&srq->lock, flags);
srq              3482 drivers/infiniband/hw/qedr/verbs.c 	hw_srq = &srq->hw_srq;
srq              3483 drivers/infiniband/hw/qedr/verbs.c 	pbl = &srq->hw_srq.pbl;
srq              3489 drivers/infiniband/hw/qedr/verbs.c 		    wr->num_sge > srq->hw_srq.max_sges) {
srq              3492 drivers/infiniband/hw/qedr/verbs.c 			       wr->num_sge, srq->hw_srq.max_sges);
srq              3503 drivers/infiniband/hw/qedr/verbs.c 		srq->hw_srq.wr_prod_cnt++;
srq              3534 drivers/infiniband/hw/qedr/verbs.c 		*srq->hw_srq.virt_prod_pair_addr = hw_srq->sge_prod;
srq              3536 drivers/infiniband/hw/qedr/verbs.c 		*((u8 *)srq->hw_srq.virt_prod_pair_addr + offset) =
srq              3546 drivers/infiniband/hw/qedr/verbs.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq              3942 drivers/infiniband/hw/qedr/verbs.c 	struct qedr_srq *srq = qp->srq;
srq              3959 drivers/infiniband/hw/qedr/verbs.c 	srq->hw_srq.wr_cons_cnt++;
srq               190 drivers/infiniband/hw/vmw_pvrdma/pvrdma.h 	struct pvrdma_srq *srq;
srq               365 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 	struct pvrdma_srq *srq;
srq               370 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 		srq = dev->srq_tbl[srqn % dev->dsr->caps.max_srq];
srq               372 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 		srq = NULL;
srq               373 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 	if (srq)
srq               374 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 		refcount_inc(&srq->refcnt);
srq               377 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 	if (srq && srq->ibsrq.event_handler) {
srq               378 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 		struct ib_srq *ibsrq = &srq->ibsrq;
srq               382 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 		e.element.srq = ibsrq;
srq               386 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 	if (srq) {
srq               387 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 		if (refcount_dec_and_test(&srq->refcnt))
srq               388 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c 			complete(&srq->free);
srq               201 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c 	bool is_srq = !!init_attr->srq;
srq               271 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c 				qp->srq = NULL;
srq               274 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c 				qp->srq = to_vsrq(init_attr->srq);
srq               353 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c 		cmd->srq_handle = to_vsrq(init_attr->srq)->srq_handle;
srq               848 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c 	if (qp->srq) {
srq               991 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c 	init_attr->srq = qp->ibqp.srq;
srq                65 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	struct pvrdma_srq *srq = to_vsrq(ibsrq);
srq                74 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	cmd->srq_handle = srq->srq_handle;
srq               102 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	struct pvrdma_srq *srq = to_vsrq(ibsrq);
srq               137 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	spin_lock_init(&srq->lock);
srq               138 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	refcount_set(&srq->refcnt, 1);
srq               139 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	init_completion(&srq->free);
srq               149 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	srq->umem = ib_umem_get(udata, ucmd.buf_addr, ucmd.buf_size, 0, 0);
srq               150 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	if (IS_ERR(srq->umem)) {
srq               151 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 		ret = PTR_ERR(srq->umem);
srq               155 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	srq->npages = ib_umem_page_count(srq->umem);
srq               157 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	if (srq->npages < 0 || srq->npages > PVRDMA_PAGE_DIR_MAX_PAGES) {
srq               164 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	ret = pvrdma_page_dir_init(dev, &srq->pdir, srq->npages, false);
srq               171 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	pvrdma_page_dir_insert_umem(&srq->pdir, srq->umem, 0);
srq               176 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	cmd->nchunks = srq->npages;
srq               181 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	cmd->pdir_dma = srq->pdir.dir_dma;
srq               191 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	srq->srq_handle = resp->srqn;
srq               194 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	dev->srq_tbl[srq->srq_handle % dev->dsr->caps.max_srq] = srq;
srq               200 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 		pvrdma_destroy_srq(&srq->ibsrq, udata);
srq               207 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	pvrdma_page_dir_cleanup(dev, &srq->pdir);
srq               209 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	ib_umem_release(srq->umem);
srq               216 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c static void pvrdma_free_srq(struct pvrdma_dev *dev, struct pvrdma_srq *srq)
srq               221 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	dev->srq_tbl[srq->srq_handle] = NULL;
srq               224 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	if (refcount_dec_and_test(&srq->refcnt))
srq               225 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 		complete(&srq->free);
srq               226 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	wait_for_completion(&srq->free);
srq               229 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	ib_umem_release(srq->umem);
srq               231 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	pvrdma_page_dir_cleanup(dev, &srq->pdir);
srq               243 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c void pvrdma_destroy_srq(struct ib_srq *srq, struct ib_udata *udata)
srq               245 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	struct pvrdma_srq *vsrq = to_vsrq(srq);
srq               248 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c 	struct pvrdma_dev *dev = to_vdev(srq->device);
srq               421 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h int pvrdma_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *init_attr,
srq               425 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h int pvrdma_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
srq               426 drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h void pvrdma_destroy_srq(struct ib_srq *srq, struct ib_udata *udata);
srq              1087 drivers/infiniband/sw/rdmavt/qp.c 	if (!init_attr->srq) {
srq              1119 drivers/infiniband/sw/rdmavt/qp.c 		if (init_attr->srq) {
srq              1120 drivers/infiniband/sw/rdmavt/qp.c 			struct rvt_srq *srq = ibsrq_to_rvtsrq(init_attr->srq);
srq              1122 drivers/infiniband/sw/rdmavt/qp.c 			if (srq->rq.max_sge > 1)
srq              1124 drivers/infiniband/sw/rdmavt/qp.c 					(srq->rq.max_sge - 1);
srq              1163 drivers/infiniband/sw/rdmavt/qp.c 		if (init_attr->srq) {
srq              1775 drivers/infiniband/sw/rdmavt/qp.c 	attr->cap.max_recv_wr = qp->ibqp.srq ? 0 : qp->r_rq.size - 1;
srq              1800 drivers/infiniband/sw/rdmavt/qp.c 	init_attr->srq = qp->ibqp.srq;
srq              1828 drivers/infiniband/sw/rdmavt/qp.c 				!qp->ibqp.srq;
srq              2246 drivers/infiniband/sw/rdmavt/qp.c 	struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
srq              2255 drivers/infiniband/sw/rdmavt/qp.c 		if ((unsigned)wr->num_sge > srq->rq.max_sge) {
srq              2260 drivers/infiniband/sw/rdmavt/qp.c 		spin_lock_irqsave(&srq->rq.kwq->p_lock, flags);
srq              2261 drivers/infiniband/sw/rdmavt/qp.c 		wq = srq->rq.kwq;
srq              2263 drivers/infiniband/sw/rdmavt/qp.c 		if (next >= srq->rq.size)
srq              2266 drivers/infiniband/sw/rdmavt/qp.c 			spin_unlock_irqrestore(&srq->rq.kwq->p_lock, flags);
srq              2271 drivers/infiniband/sw/rdmavt/qp.c 		wqe = rvt_get_rwqe_ptr(&srq->rq, wq->head);
srq              2281 drivers/infiniband/sw/rdmavt/qp.c 		spin_unlock_irqrestore(&srq->rq.kwq->p_lock, flags);
srq              2316 drivers/infiniband/sw/rdmavt/qp.c 	pd = ibpd_to_rvtpd(qp->ibqp.srq ? qp->ibqp.srq->pd : qp->ibqp.pd);
srq              2413 drivers/infiniband/sw/rdmavt/qp.c 	struct rvt_srq *srq;
srq              2421 drivers/infiniband/sw/rdmavt/qp.c 	if (qp->ibqp.srq) {
srq              2422 drivers/infiniband/sw/rdmavt/qp.c 		srq = ibsrq_to_rvtsrq(qp->ibqp.srq);
srq              2423 drivers/infiniband/sw/rdmavt/qp.c 		handler = srq->ibsrq.event_handler;
srq              2424 drivers/infiniband/sw/rdmavt/qp.c 		rq = &srq->rq;
srq              2425 drivers/infiniband/sw/rdmavt/qp.c 		ip = srq->ip;
srq              2427 drivers/infiniband/sw/rdmavt/qp.c 		srq = NULL;
srq              2486 drivers/infiniband/sw/rdmavt/qp.c 		if (kwq->count < srq->limit) {
srq              2488 drivers/infiniband/sw/rdmavt/qp.c 			if (kwq->count < srq->limit) {
srq              2491 drivers/infiniband/sw/rdmavt/qp.c 				srq->limit = 0;
srq              2494 drivers/infiniband/sw/rdmavt/qp.c 				ev.element.srq = qp->ibqp.srq;
srq              2496 drivers/infiniband/sw/rdmavt/qp.c 				handler(&ev, srq->ibsrq.srq_context);
srq                98 drivers/infiniband/sw/rdmavt/rc.c 	if (qp->ibqp.srq) {
srq                80 drivers/infiniband/sw/rdmavt/srq.c 	struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
srq                96 drivers/infiniband/sw/rdmavt/srq.c 	srq->rq.size = srq_init_attr->attr.max_wr + 1;
srq                97 drivers/infiniband/sw/rdmavt/srq.c 	srq->rq.max_sge = srq_init_attr->attr.max_sge;
srq                98 drivers/infiniband/sw/rdmavt/srq.c 	sz = sizeof(struct ib_sge) * srq->rq.max_sge +
srq               100 drivers/infiniband/sw/rdmavt/srq.c 	if (rvt_alloc_rq(&srq->rq, srq->rq.size * sz,
srq               111 drivers/infiniband/sw/rdmavt/srq.c 		u32 s = sizeof(struct rvt_rwq) + srq->rq.size * sz;
srq               113 drivers/infiniband/sw/rdmavt/srq.c 		srq->ip = rvt_create_mmap_info(dev, s, udata, srq->rq.wq);
srq               114 drivers/infiniband/sw/rdmavt/srq.c 		if (IS_ERR(srq->ip)) {
srq               115 drivers/infiniband/sw/rdmavt/srq.c 			ret = PTR_ERR(srq->ip);
srq               119 drivers/infiniband/sw/rdmavt/srq.c 		ret = ib_copy_to_udata(udata, &srq->ip->offset,
srq               120 drivers/infiniband/sw/rdmavt/srq.c 				       sizeof(srq->ip->offset));
srq               128 drivers/infiniband/sw/rdmavt/srq.c 	spin_lock_init(&srq->rq.lock);
srq               129 drivers/infiniband/sw/rdmavt/srq.c 	srq->limit = srq_init_attr->attr.srq_limit;
srq               141 drivers/infiniband/sw/rdmavt/srq.c 	if (srq->ip) {
srq               143 drivers/infiniband/sw/rdmavt/srq.c 		list_add(&srq->ip->pending_mmaps, &dev->pending_mmaps);
srq               150 drivers/infiniband/sw/rdmavt/srq.c 	kfree(srq->ip);
srq               152 drivers/infiniband/sw/rdmavt/srq.c 	rvt_free_rq(&srq->rq);
srq               170 drivers/infiniband/sw/rdmavt/srq.c 	struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
srq               184 drivers/infiniband/sw/rdmavt/srq.c 		     attr->srq_limit : srq->limit) > attr->max_wr)
srq               187 drivers/infiniband/sw/rdmavt/srq.c 			srq->rq.max_sge * sizeof(struct ib_sge);
srq               209 drivers/infiniband/sw/rdmavt/srq.c 		spin_lock_irq(&srq->rq.kwq->c_lock);
srq               215 drivers/infiniband/sw/rdmavt/srq.c 			owq = srq->rq.wq;
srq               219 drivers/infiniband/sw/rdmavt/srq.c 			okwq = srq->rq.kwq;
srq               223 drivers/infiniband/sw/rdmavt/srq.c 		if (head >= srq->rq.size || tail >= srq->rq.size) {
srq               229 drivers/infiniband/sw/rdmavt/srq.c 			n += srq->rq.size - tail;
srq               242 drivers/infiniband/sw/rdmavt/srq.c 			wqe = rvt_get_rwqe_ptr(&srq->rq, tail);
srq               249 drivers/infiniband/sw/rdmavt/srq.c 			if (++tail >= srq->rq.size)
srq               252 drivers/infiniband/sw/rdmavt/srq.c 		srq->rq.kwq = tmp_rq.kwq;
srq               254 drivers/infiniband/sw/rdmavt/srq.c 			srq->rq.wq = tmp_rq.wq;
srq               261 drivers/infiniband/sw/rdmavt/srq.c 		srq->rq.size = size;
srq               263 drivers/infiniband/sw/rdmavt/srq.c 			srq->limit = attr->srq_limit;
srq               264 drivers/infiniband/sw/rdmavt/srq.c 		spin_unlock_irq(&srq->rq.kwq->c_lock);
srq               269 drivers/infiniband/sw/rdmavt/srq.c 		if (srq->ip) {
srq               270 drivers/infiniband/sw/rdmavt/srq.c 			struct rvt_mmap_info *ip = srq->ip;
srq               271 drivers/infiniband/sw/rdmavt/srq.c 			struct rvt_dev_info *dev = ib_to_rvt(srq->ibsrq.device);
srq               298 drivers/infiniband/sw/rdmavt/srq.c 		spin_lock_irq(&srq->rq.kwq->c_lock);
srq               299 drivers/infiniband/sw/rdmavt/srq.c 		if (attr->srq_limit >= srq->rq.size)
srq               302 drivers/infiniband/sw/rdmavt/srq.c 			srq->limit = attr->srq_limit;
srq               303 drivers/infiniband/sw/rdmavt/srq.c 		spin_unlock_irq(&srq->rq.kwq->c_lock);
srq               308 drivers/infiniband/sw/rdmavt/srq.c 	spin_unlock_irq(&srq->rq.kwq->c_lock);
srq               322 drivers/infiniband/sw/rdmavt/srq.c 	struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
srq               324 drivers/infiniband/sw/rdmavt/srq.c 	attr->max_wr = srq->rq.size - 1;
srq               325 drivers/infiniband/sw/rdmavt/srq.c 	attr->max_sge = srq->rq.max_sge;
srq               326 drivers/infiniband/sw/rdmavt/srq.c 	attr->srq_limit = srq->limit;
srq               337 drivers/infiniband/sw/rdmavt/srq.c 	struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
srq               343 drivers/infiniband/sw/rdmavt/srq.c 	if (srq->ip)
srq               344 drivers/infiniband/sw/rdmavt/srq.c 		kref_put(&srq->ip->ref, rvt_release_mmap_info);
srq               345 drivers/infiniband/sw/rdmavt/srq.c 	kvfree(srq->rq.kwq);
srq               222 drivers/infiniband/sw/rxe/rxe_loc.h int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
srq               225 drivers/infiniband/sw/rxe/rxe_loc.h int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq,
srq               229 drivers/infiniband/sw/rxe/rxe_loc.h int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
srq                97 drivers/infiniband/sw/rxe/rxe_qp.c 	if (rxe_qp_chk_cap(rxe, cap, !!init->srq))
srq               295 drivers/infiniband/sw/rxe/rxe_qp.c 	if (!qp->srq) {
srq               345 drivers/infiniband/sw/rxe/rxe_qp.c 	struct rxe_srq *srq = init->srq ? to_rsrq(init->srq) : NULL;
srq               350 drivers/infiniband/sw/rxe/rxe_qp.c 	if (srq)
srq               351 drivers/infiniband/sw/rxe/rxe_qp.c 		rxe_add_ref(srq);
srq               356 drivers/infiniband/sw/rxe/rxe_qp.c 	qp->srq			= srq;
srq               376 drivers/infiniband/sw/rxe/rxe_qp.c 	if (srq)
srq               377 drivers/infiniband/sw/rxe/rxe_qp.c 		rxe_drop_ref(srq);
srq               392 drivers/infiniband/sw/rxe/rxe_qp.c 	init->srq			= qp->ibqp.srq;
srq               398 drivers/infiniband/sw/rxe/rxe_qp.c 	if (!qp->srq) {
srq               442 drivers/infiniband/sw/rxe/rxe_qp.c 	if (mask & IB_QP_CAP && rxe_qp_chk_cap(rxe, &attr->cap, !!qp->srq))
srq               757 drivers/infiniband/sw/rxe/rxe_qp.c 	if (!qp->srq) {
srq               814 drivers/infiniband/sw/rxe/rxe_qp.c 	if (qp->srq)
srq               815 drivers/infiniband/sw/rxe/rxe_qp.c 		rxe_drop_ref(qp->srq);
srq               318 drivers/infiniband/sw/rxe/rxe_resp.c 	struct rxe_srq *srq = qp->srq;
srq               319 drivers/infiniband/sw/rxe/rxe_resp.c 	struct rxe_queue *q = srq->rq.queue;
srq               323 drivers/infiniband/sw/rxe/rxe_resp.c 	if (srq->error)
srq               326 drivers/infiniband/sw/rxe/rxe_resp.c 	spin_lock_bh(&srq->rq.consumer_lock);
srq               330 drivers/infiniband/sw/rxe/rxe_resp.c 		spin_unlock_bh(&srq->rq.consumer_lock);
srq               340 drivers/infiniband/sw/rxe/rxe_resp.c 	if (srq->limit && srq->ibsrq.event_handler &&
srq               341 drivers/infiniband/sw/rxe/rxe_resp.c 	    (queue_count(q) < srq->limit)) {
srq               342 drivers/infiniband/sw/rxe/rxe_resp.c 		srq->limit = 0;
srq               346 drivers/infiniband/sw/rxe/rxe_resp.c 	spin_unlock_bh(&srq->rq.consumer_lock);
srq               350 drivers/infiniband/sw/rxe/rxe_resp.c 	spin_unlock_bh(&srq->rq.consumer_lock);
srq               352 drivers/infiniband/sw/rxe/rxe_resp.c 	ev.element.srq = qp->ibqp.srq;
srq               354 drivers/infiniband/sw/rxe/rxe_resp.c 	srq->ibsrq.event_handler(&ev, srq->ibsrq.srq_context);
srq               361 drivers/infiniband/sw/rxe/rxe_resp.c 	struct rxe_srq *srq = qp->srq;
srq               367 drivers/infiniband/sw/rxe/rxe_resp.c 		} else if (!srq) {
srq               392 drivers/infiniband/sw/rxe/rxe_resp.c 		if (srq)
srq               939 drivers/infiniband/sw/rxe/rxe_resp.c 	if (!qp->srq)
srq              1173 drivers/infiniband/sw/rxe/rxe_resp.c 	if (qp->srq) {
srq              1216 drivers/infiniband/sw/rxe/rxe_resp.c 	while (!qp->srq && qp->rq.queue && queue_head(qp->rq.queue))
srq              1333 drivers/infiniband/sw/rxe/rxe_resp.c 				if (qp->srq) {
srq              1350 drivers/infiniband/sw/rxe/rxe_resp.c 			} else if (qp->srq) {
srq                39 drivers/infiniband/sw/rxe/rxe_srq.c int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
srq                42 drivers/infiniband/sw/rxe/rxe_srq.c 	if (srq && srq->error) {
srq                59 drivers/infiniband/sw/rxe/rxe_srq.c 		if (srq && srq->limit && (attr->max_wr < srq->limit)) {
srq                61 drivers/infiniband/sw/rxe/rxe_srq.c 				attr->max_wr, srq->limit);
srq                76 drivers/infiniband/sw/rxe/rxe_srq.c 		if (srq && (attr->srq_limit > srq->rq.queue->buf->index_mask)) {
srq                79 drivers/infiniband/sw/rxe/rxe_srq.c 				 srq->rq.queue->buf->index_mask);
srq               101 drivers/infiniband/sw/rxe/rxe_srq.c int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq,
srq               109 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->ibsrq.event_handler	= init->event_handler;
srq               110 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->ibsrq.srq_context		= init->srq_context;
srq               111 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->limit		= init->attr.srq_limit;
srq               112 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->srq_num		= srq->pelem.index;
srq               113 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->rq.max_wr		= init->attr.max_wr;
srq               114 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->rq.max_sge		= init->attr.max_sge;
srq               116 drivers/infiniband/sw/rxe/rxe_srq.c 	srq_wqe_size		= rcv_wqe_size(srq->rq.max_sge);
srq               118 drivers/infiniband/sw/rxe/rxe_srq.c 	spin_lock_init(&srq->rq.producer_lock);
srq               119 drivers/infiniband/sw/rxe/rxe_srq.c 	spin_lock_init(&srq->rq.consumer_lock);
srq               121 drivers/infiniband/sw/rxe/rxe_srq.c 	q = rxe_queue_init(rxe, &srq->rq.max_wr,
srq               128 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->rq.queue = q;
srq               139 drivers/infiniband/sw/rxe/rxe_srq.c 		if (copy_to_user(&uresp->srq_num, &srq->srq_num,
srq               149 drivers/infiniband/sw/rxe/rxe_srq.c int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
srq               154 drivers/infiniband/sw/rxe/rxe_srq.c 	struct rxe_queue *q = srq->rq.queue;
srq               165 drivers/infiniband/sw/rxe/rxe_srq.c 				       rcv_wqe_size(srq->rq.max_sge), udata, mi,
srq               166 drivers/infiniband/sw/rxe/rxe_srq.c 				       &srq->rq.producer_lock,
srq               167 drivers/infiniband/sw/rxe/rxe_srq.c 				       &srq->rq.consumer_lock);
srq               173 drivers/infiniband/sw/rxe/rxe_srq.c 		srq->limit = attr->srq_limit;
srq               179 drivers/infiniband/sw/rxe/rxe_srq.c 	srq->rq.queue = NULL;
srq               298 drivers/infiniband/sw/rxe/rxe_verbs.c 	struct rxe_srq *srq = to_rsrq(ibsrq);
srq               311 drivers/infiniband/sw/rxe/rxe_verbs.c 	err = rxe_add_to_pool(&rxe->srq_pool, &srq->pelem);
srq               316 drivers/infiniband/sw/rxe/rxe_verbs.c 	srq->pd = pd;
srq               318 drivers/infiniband/sw/rxe/rxe_verbs.c 	err = rxe_srq_from_init(rxe, srq, init, udata, uresp);
srq               326 drivers/infiniband/sw/rxe/rxe_verbs.c 	rxe_drop_ref(srq);
srq               336 drivers/infiniband/sw/rxe/rxe_verbs.c 	struct rxe_srq *srq = to_rsrq(ibsrq);
srq               349 drivers/infiniband/sw/rxe/rxe_verbs.c 	err = rxe_srq_chk_attr(rxe, srq, attr, mask);
srq               353 drivers/infiniband/sw/rxe/rxe_verbs.c 	err = rxe_srq_from_attr(rxe, srq, attr, mask, &ucmd, udata);
srq               365 drivers/infiniband/sw/rxe/rxe_verbs.c 	struct rxe_srq *srq = to_rsrq(ibsrq);
srq               367 drivers/infiniband/sw/rxe/rxe_verbs.c 	if (srq->error)
srq               370 drivers/infiniband/sw/rxe/rxe_verbs.c 	attr->max_wr = srq->rq.queue->buf->index_mask;
srq               371 drivers/infiniband/sw/rxe/rxe_verbs.c 	attr->max_sge = srq->rq.max_sge;
srq               372 drivers/infiniband/sw/rxe/rxe_verbs.c 	attr->srq_limit = srq->limit;
srq               378 drivers/infiniband/sw/rxe/rxe_verbs.c 	struct rxe_srq *srq = to_rsrq(ibsrq);
srq               380 drivers/infiniband/sw/rxe/rxe_verbs.c 	if (srq->rq.queue)
srq               381 drivers/infiniband/sw/rxe/rxe_verbs.c 		rxe_queue_cleanup(srq->rq.queue);
srq               383 drivers/infiniband/sw/rxe/rxe_verbs.c 	rxe_drop_ref(srq->pd);
srq               384 drivers/infiniband/sw/rxe/rxe_verbs.c 	rxe_drop_ref(srq);
srq               392 drivers/infiniband/sw/rxe/rxe_verbs.c 	struct rxe_srq *srq = to_rsrq(ibsrq);
srq               394 drivers/infiniband/sw/rxe/rxe_verbs.c 	spin_lock_irqsave(&srq->rq.producer_lock, flags);
srq               397 drivers/infiniband/sw/rxe/rxe_verbs.c 		err = post_one_recv(&srq->rq, wr);
srq               403 drivers/infiniband/sw/rxe/rxe_verbs.c 	spin_unlock_irqrestore(&srq->rq.producer_lock, flags);
srq               755 drivers/infiniband/sw/rxe/rxe_verbs.c 	if (unlikely(qp->srq)) {
srq               244 drivers/infiniband/sw/rxe/rxe_verbs.h 	struct rxe_srq		*srq;
srq               443 drivers/infiniband/sw/rxe/rxe_verbs.h static inline struct rxe_srq *to_rsrq(struct ib_srq *srq)
srq               445 drivers/infiniband/sw/rxe/rxe_verbs.h 	return srq ? container_of(srq, struct rxe_srq, ibsrq) : NULL;
srq               446 drivers/infiniband/sw/siw/siw.h 	struct siw_srq *srq;
srq               332 drivers/infiniband/sw/siw/siw_qp_rx.c 	struct siw_srq *srq;
srq               337 drivers/infiniband/sw/siw/siw_qp_rx.c 	srq = qp->srq;
srq               338 drivers/infiniband/sw/siw/siw_qp_rx.c 	if (srq) {
srq               339 drivers/infiniband/sw/siw/siw_qp_rx.c 		spin_lock_irqsave(&srq->lock, flags);
srq               340 drivers/infiniband/sw/siw/siw_qp_rx.c 		if (unlikely(!srq->num_rqe))
srq               343 drivers/infiniband/sw/siw/siw_qp_rx.c 		rqe = &srq->recvq[srq->rq_get % srq->num_rqe];
srq               377 drivers/infiniband/sw/siw/siw_qp_rx.c 			if (srq)
srq               378 drivers/infiniband/sw/siw/siw_qp_rx.c 				spin_unlock_irqrestore(&srq->lock, flags);
srq               381 drivers/infiniband/sw/siw/siw_qp_rx.c 		if (!srq) {
srq               384 drivers/infiniband/sw/siw/siw_qp_rx.c 			if (srq->armed) {
srq               386 drivers/infiniband/sw/siw/siw_qp_rx.c 				u32 off = (srq->rq_get + srq->limit) %
srq               387 drivers/infiniband/sw/siw/siw_qp_rx.c 					  srq->num_rqe;
srq               388 drivers/infiniband/sw/siw/siw_qp_rx.c 				struct siw_rqe *rqe2 = &srq->recvq[off];
srq               391 drivers/infiniband/sw/siw/siw_qp_rx.c 					srq->armed = 0;
srq               395 drivers/infiniband/sw/siw/siw_qp_rx.c 			srq->rq_get++;
srq               399 drivers/infiniband/sw/siw/siw_qp_rx.c 	if (srq) {
srq               400 drivers/infiniband/sw/siw/siw_qp_rx.c 		spin_unlock_irqrestore(&srq->lock, flags);
srq               402 drivers/infiniband/sw/siw/siw_qp_rx.c 			siw_srq_event(srq, IB_EVENT_SRQ_LIMIT_REACHED);
srq               474 drivers/infiniband/sw/siw/siw_qp_rx.c 		pd = qp->srq == NULL ? qp->pd : qp->srq->base_srq.pd;
srq               359 drivers/infiniband/sw/siw/siw_verbs.c 	if (!scq || (!rcq && !attrs->srq)) {
srq               420 drivers/infiniband/sw/siw/siw_verbs.c 	if (attrs->srq) {
srq               426 drivers/infiniband/sw/siw/siw_verbs.c 		qp->srq = to_siw_srq(attrs->srq);
srq               551 drivers/infiniband/sw/siw/siw_verbs.c 	qp_init_attr->srq = base_qp->srq;
srq               985 drivers/infiniband/sw/siw/siw_verbs.c 	if (qp->srq) {
srq              1572 drivers/infiniband/sw/siw/siw_verbs.c 	struct siw_srq *srq = to_siw_srq(base_srq);
srq              1590 drivers/infiniband/sw/siw/siw_verbs.c 	srq->max_sge = attrs->max_sge;
srq              1591 drivers/infiniband/sw/siw/siw_verbs.c 	srq->num_rqe = roundup_pow_of_two(attrs->max_wr);
srq              1592 drivers/infiniband/sw/siw/siw_verbs.c 	srq->xa_srq_index = SIW_INVAL_UOBJ_KEY;
srq              1593 drivers/infiniband/sw/siw/siw_verbs.c 	srq->limit = attrs->srq_limit;
srq              1594 drivers/infiniband/sw/siw/siw_verbs.c 	if (srq->limit)
srq              1595 drivers/infiniband/sw/siw/siw_verbs.c 		srq->armed = 1;
srq              1597 drivers/infiniband/sw/siw/siw_verbs.c 	srq->kernel_verbs = !udata;
srq              1600 drivers/infiniband/sw/siw/siw_verbs.c 		srq->recvq =
srq              1601 drivers/infiniband/sw/siw/siw_verbs.c 			vmalloc_user(srq->num_rqe * sizeof(struct siw_rqe));
srq              1603 drivers/infiniband/sw/siw/siw_verbs.c 		srq->recvq = vzalloc(srq->num_rqe * sizeof(struct siw_rqe));
srq              1605 drivers/infiniband/sw/siw/siw_verbs.c 	if (srq->recvq == NULL) {
srq              1612 drivers/infiniband/sw/siw/siw_verbs.c 		srq->xa_srq_index = siw_create_uobj(
srq              1613 drivers/infiniband/sw/siw/siw_verbs.c 			ctx, srq->recvq, srq->num_rqe * sizeof(struct siw_rqe));
srq              1615 drivers/infiniband/sw/siw/siw_verbs.c 		if (srq->xa_srq_index == SIW_INVAL_UOBJ_KEY) {
srq              1619 drivers/infiniband/sw/siw/siw_verbs.c 		uresp.srq_key = srq->xa_srq_index;
srq              1620 drivers/infiniband/sw/siw/siw_verbs.c 		uresp.num_rqe = srq->num_rqe;
srq              1630 drivers/infiniband/sw/siw/siw_verbs.c 	spin_lock_init(&srq->lock);
srq              1637 drivers/infiniband/sw/siw/siw_verbs.c 	if (srq->recvq) {
srq              1638 drivers/infiniband/sw/siw/siw_verbs.c 		if (ctx && srq->xa_srq_index != SIW_INVAL_UOBJ_KEY)
srq              1639 drivers/infiniband/sw/siw/siw_verbs.c 			kfree(xa_erase(&ctx->xa, srq->xa_srq_index));
srq              1640 drivers/infiniband/sw/siw/siw_verbs.c 		vfree(srq->recvq);
srq              1659 drivers/infiniband/sw/siw/siw_verbs.c 	struct siw_srq *srq = to_siw_srq(base_srq);
srq              1663 drivers/infiniband/sw/siw/siw_verbs.c 	spin_lock_irqsave(&srq->lock, flags);
srq              1672 drivers/infiniband/sw/siw/siw_verbs.c 			if (unlikely(attrs->srq_limit > srq->num_rqe)) {
srq              1676 drivers/infiniband/sw/siw/siw_verbs.c 			srq->armed = 1;
srq              1678 drivers/infiniband/sw/siw/siw_verbs.c 			srq->armed = 0;
srq              1680 drivers/infiniband/sw/siw/siw_verbs.c 		srq->limit = attrs->srq_limit;
srq              1683 drivers/infiniband/sw/siw/siw_verbs.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq              1695 drivers/infiniband/sw/siw/siw_verbs.c 	struct siw_srq *srq = to_siw_srq(base_srq);
srq              1698 drivers/infiniband/sw/siw/siw_verbs.c 	spin_lock_irqsave(&srq->lock, flags);
srq              1700 drivers/infiniband/sw/siw/siw_verbs.c 	attrs->max_wr = srq->num_rqe;
srq              1701 drivers/infiniband/sw/siw/siw_verbs.c 	attrs->max_sge = srq->max_sge;
srq              1702 drivers/infiniband/sw/siw/siw_verbs.c 	attrs->srq_limit = srq->limit;
srq              1704 drivers/infiniband/sw/siw/siw_verbs.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq              1719 drivers/infiniband/sw/siw/siw_verbs.c 	struct siw_srq *srq = to_siw_srq(base_srq);
srq              1725 drivers/infiniband/sw/siw/siw_verbs.c 	if (ctx && srq->xa_srq_index != SIW_INVAL_UOBJ_KEY)
srq              1726 drivers/infiniband/sw/siw/siw_verbs.c 		kfree(xa_erase(&ctx->xa, srq->xa_srq_index));
srq              1728 drivers/infiniband/sw/siw/siw_verbs.c 	vfree(srq->recvq);
srq              1747 drivers/infiniband/sw/siw/siw_verbs.c 	struct siw_srq *srq = to_siw_srq(base_srq);
srq              1751 drivers/infiniband/sw/siw/siw_verbs.c 	if (unlikely(!srq->kernel_verbs)) {
srq              1762 drivers/infiniband/sw/siw/siw_verbs.c 	spin_lock_irqsave(&srq->lock, flags);
srq              1765 drivers/infiniband/sw/siw/siw_verbs.c 		u32 idx = srq->rq_put % srq->num_rqe;
srq              1766 drivers/infiniband/sw/siw/siw_verbs.c 		struct siw_rqe *rqe = &srq->recvq[idx];
srq              1773 drivers/infiniband/sw/siw/siw_verbs.c 		if (unlikely(wr->num_sge > srq->max_sge)) {
srq              1788 drivers/infiniband/sw/siw/siw_verbs.c 		srq->rq_put++;
srq              1791 drivers/infiniband/sw/siw/siw_verbs.c 	spin_unlock_irqrestore(&srq->lock, flags);
srq              1837 drivers/infiniband/sw/siw/siw_verbs.c void siw_srq_event(struct siw_srq *srq, enum ib_event_type etype)
srq              1840 drivers/infiniband/sw/siw/siw_verbs.c 	struct ib_srq *base_srq = &srq->base_srq;
srq              1844 drivers/infiniband/sw/siw/siw_verbs.c 	event.element.srq = base_srq;
srq              1847 drivers/infiniband/sw/siw/siw_verbs.c 		siw_dbg_pd(srq->base_srq.pd,
srq                88 drivers/infiniband/sw/siw/siw_verbs.h void siw_srq_event(struct siw_srq *srq, enum ib_event_type type);
srq               265 drivers/infiniband/ulp/ipoib/ipoib.h 	struct ib_srq	       *srq;
srq               657 drivers/infiniband/ulp/ipoib/ipoib.h 	return !!priv->cm.srq;
srq               104 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ret = ib_post_srq_recv(priv->cm.srq, &priv->cm.rx_wr, NULL);
srq               257 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		.srq = priv->cm.srq,
srq               436 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	rep.srq = ipoib_cm_has_srq(dev);
srq              1063 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		.srq			= priv->cm.srq,
srq              1115 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	req.srq				= ipoib_cm_has_srq(dev);
srq              1567 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.srq = ib_create_srq(priv->pd, &srq_init_attr);
srq              1568 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (IS_ERR(priv->cm.srq)) {
srq              1569 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		if (PTR_ERR(priv->cm.srq) != -EOPNOTSUPP)
srq              1571 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			       priv->ca->name, PTR_ERR(priv->cm.srq));
srq              1572 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.srq = NULL;
srq              1579 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		ib_destroy_srq(priv->cm.srq);
srq              1580 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.srq = NULL;
srq              1652 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (!priv->cm.srq)
srq              1657 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ret = ib_destroy_srq(priv->cm.srq);
srq              1661 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.srq = NULL;
srq               839 drivers/infiniband/ulp/srpt/ib_srpt.c 		return ib_post_srq_recv(sdev->srq, &wr, NULL);
srq              1825 drivers/infiniband/ulp/srpt/ib_srpt.c 		qp_init->srq = sdev->srq;
srq              2419 drivers/infiniband/ulp/srpt/ib_srpt.c 		rep_param->ib_cm.srq = 1;
srq              3025 drivers/infiniband/ulp/srpt/ib_srpt.c 	if (!sdev->srq)
srq              3028 drivers/infiniband/ulp/srpt/ib_srpt.c 	ib_destroy_srq(sdev->srq);
srq              3033 drivers/infiniband/ulp/srpt/ib_srpt.c 	sdev->srq = NULL;
srq              3046 drivers/infiniband/ulp/srpt/ib_srpt.c 	struct ib_srq *srq;
srq              3049 drivers/infiniband/ulp/srpt/ib_srpt.c 	WARN_ON_ONCE(sdev->srq);
srq              3050 drivers/infiniband/ulp/srpt/ib_srpt.c 	srq = ib_create_srq(sdev->pd, &srq_attr);
srq              3051 drivers/infiniband/ulp/srpt/ib_srpt.c 	if (IS_ERR(srq)) {
srq              3052 drivers/infiniband/ulp/srpt/ib_srpt.c 		pr_debug("ib_create_srq() failed: %ld\n", PTR_ERR(srq));
srq              3053 drivers/infiniband/ulp/srpt/ib_srpt.c 		return PTR_ERR(srq);
srq              3072 drivers/infiniband/ulp/srpt/ib_srpt.c 	sdev->srq = srq;
srq              3085 drivers/infiniband/ulp/srpt/ib_srpt.c 	ib_destroy_srq(srq);
srq              3097 drivers/infiniband/ulp/srpt/ib_srpt.c 	} else if (use_srq && !sdev->srq) {
srq               426 drivers/infiniband/ulp/srpt/ib_srpt.h 	struct ib_srq		*srq;
srq               262 drivers/net/eql.c static int eql_enslave(struct net_device *dev,  slaving_request_t __user *srq);
srq               263 drivers/net/eql.c static int eql_emancipate(struct net_device *dev, slaving_request_t __user *srq);
srq               410 drivers/net/eql.c 	slaving_request_t srq;
srq               412 drivers/net/eql.c 	if (copy_from_user(&srq, srqp, sizeof (slaving_request_t)))
srq               415 drivers/net/eql.c 	slave_dev = __dev_get_by_name(&init_net, srq.slave_name);
srq               431 drivers/net/eql.c 			s->priority = srq.priority;
srq               432 drivers/net/eql.c 			s->priority_bps = srq.priority;
srq               433 drivers/net/eql.c 			s->priority_Bps = srq.priority / 8;
srq               453 drivers/net/eql.c 	slaving_request_t srq;
srq               456 drivers/net/eql.c 	if (copy_from_user(&srq, srqp, sizeof (slaving_request_t)))
srq               459 drivers/net/eql.c 	slave_dev = __dev_get_by_name(&init_net, srq.slave_name);
srq              1041 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h 	struct srq_data *srq;
srq              4757 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			adap->vres.srq.start = val[0];
srq              4758 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			adap->vres.srq.size = val[1] - val[0] + 1;
srq              4760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		if (adap->vres.srq.size) {
srq              4761 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			adap->srq = t4_init_srq(adap->vres.srq.size);
srq              4762 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			if (!adap->srq)
srq              5440 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	kvfree(adapter->srq);
srq               288 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h 	struct cxgb4_range srq;
srq                78 drivers/net/ethernet/chelsio/cxgb4/srq.c 	s = adap->srq;
srq               116 drivers/net/ethernet/chelsio/cxgb4/srq.c 	struct srq_data *s = adap->srq;
srq               559 drivers/net/ethernet/mellanox/mlx4/eq.c 				 __func__, be32_to_cpu(eqe->event.srq.srqn),
srq               567 drivers/net/ethernet/mellanox/mlx4/eq.c 						be32_to_cpu(eqe->event.srq.srqn)
srq               580 drivers/net/ethernet/mellanox/mlx4/eq.c 						  be32_to_cpu(eqe->event.srq.srqn),
srq               593 drivers/net/ethernet/mellanox/mlx4/eq.c 			mlx4_srq_event(dev, be32_to_cpu(eqe->event.srq.srqn) &
srq               998 drivers/net/ethernet/mellanox/mlx4/main.c 	dev->quotas.srq			= func_cap->srq_quota;
srq               113 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq	       *srq;
srq               455 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		dev->quotas.srq = dev->caps.num_srqs - dev->caps.reserved_srqs;
srq               466 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	dev->quotas.srq =
srq              1712 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				 enum res_srq_states state, struct res_srq **srq)
srq              1738 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		if (srq)
srq              1739 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			*srq = r;
srq              2723 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	int srq = (be32_to_cpu(qpc->srqn) >> 24) & 1;
srq              2735 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	rq_size = (srq|rss|xrc) ? 0 : (1 << (log_rq_size + log_rq_stride + 4));
srq              2970 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq *srq;
srq              3010 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		err = get_res(dev, slave, srqn, RES_SRQ, &srq);
srq              3031 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		atomic_inc(&srq->ref_count);
srq              3033 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		qp->srq = srq;
srq              3618 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq *srq = NULL;
srq              3625 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	err = srq_res_start_move_to(dev, slave, srqn, RES_SRQ_HW, &srq);
srq              3641 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	srq->mtt = mtt;
srq              3662 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq *srq = NULL;
srq              3664 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	err = srq_res_start_move_to(dev, slave, srqn, RES_SRQ_ALLOCATED, &srq);
srq              3670 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	atomic_dec(&srq->mtt->ref_count);
srq              3671 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if (srq->cq)
srq              3672 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		atomic_dec(&srq->cq->ref_count);
srq              3691 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq *srq;
srq              3693 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	err = get_res(dev, slave, srqn, RES_SRQ, &srq);
srq              3696 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if (srq->com.from_state != RES_SRQ_HW) {
srq              3714 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq *srq;
srq              3716 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	err = get_res(dev, slave, srqn, RES_SRQ, &srq);
srq              3720 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if (srq->com.from_state != RES_SRQ_HW) {
srq              4004 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if (qp->srq)
srq              4005 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		atomic_dec(&qp->srq->ref_count);
srq              4718 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					if (qp->srq)
srq              4719 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 						atomic_dec(&qp->srq->ref_count);
srq              4738 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct res_srq *srq;
srq              4751 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	list_for_each_entry_safe(srq, tmp, srq_list, com.list) {
srq              4753 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		if (srq->com.owner == slave) {
srq              4754 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			srqn = srq->com.res_id;
srq              4755 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			state = srq->com.from_state;
srq              4761 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					rb_erase(&srq->com.node,
srq              4763 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					list_del(&srq->com.list);
srq              4767 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					kfree(srq);
srq              4781 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					atomic_dec(&srq->mtt->ref_count);
srq              4782 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					if (srq->cq)
srq              4783 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 						atomic_dec(&srq->cq->ref_count);
srq                46 drivers/net/ethernet/mellanox/mlx4/srq.c 	struct mlx4_srq *srq;
srq                49 drivers/net/ethernet/mellanox/mlx4/srq.c 	srq = radix_tree_lookup(&srq_table->tree, srqn & (dev->caps.num_srqs - 1));
srq                51 drivers/net/ethernet/mellanox/mlx4/srq.c 	if (srq)
srq                52 drivers/net/ethernet/mellanox/mlx4/srq.c 		refcount_inc(&srq->refcount);
srq                58 drivers/net/ethernet/mellanox/mlx4/srq.c 	srq->event(srq, event_type);
srq                60 drivers/net/ethernet/mellanox/mlx4/srq.c 	if (refcount_dec_and_test(&srq->refcount))
srq                61 drivers/net/ethernet/mellanox/mlx4/srq.c 		complete(&srq->free);
srq               163 drivers/net/ethernet/mellanox/mlx4/srq.c 		   struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq)
srq               171 drivers/net/ethernet/mellanox/mlx4/srq.c 	err = mlx4_srq_alloc_icm(dev, &srq->srqn);
srq               176 drivers/net/ethernet/mellanox/mlx4/srq.c 	err = radix_tree_insert(&srq_table->tree, srq->srqn, srq);
srq               188 drivers/net/ethernet/mellanox/mlx4/srq.c 	srq_context->state_logsize_srqn = cpu_to_be32((ilog2(srq->max) << 24) |
srq               189 drivers/net/ethernet/mellanox/mlx4/srq.c 						      srq->srqn);
srq               190 drivers/net/ethernet/mellanox/mlx4/srq.c 	srq_context->logstride          = srq->wqe_shift - 4;
srq               201 drivers/net/ethernet/mellanox/mlx4/srq.c 	err = mlx4_SW2HW_SRQ(dev, mailbox, srq->srqn);
srq               206 drivers/net/ethernet/mellanox/mlx4/srq.c 	refcount_set(&srq->refcount, 1);
srq               207 drivers/net/ethernet/mellanox/mlx4/srq.c 	init_completion(&srq->free);
srq               213 drivers/net/ethernet/mellanox/mlx4/srq.c 	radix_tree_delete(&srq_table->tree, srq->srqn);
srq               217 drivers/net/ethernet/mellanox/mlx4/srq.c 	mlx4_srq_free_icm(dev, srq->srqn);
srq               222 drivers/net/ethernet/mellanox/mlx4/srq.c void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq)
srq               227 drivers/net/ethernet/mellanox/mlx4/srq.c 	err = mlx4_HW2SW_SRQ(dev, NULL, srq->srqn);
srq               229 drivers/net/ethernet/mellanox/mlx4/srq.c 		mlx4_warn(dev, "HW2SW_SRQ failed (%d) for SRQN %06x\n", err, srq->srqn);
srq               232 drivers/net/ethernet/mellanox/mlx4/srq.c 	radix_tree_delete(&srq_table->tree, srq->srqn);
srq               235 drivers/net/ethernet/mellanox/mlx4/srq.c 	if (refcount_dec_and_test(&srq->refcount))
srq               236 drivers/net/ethernet/mellanox/mlx4/srq.c 		complete(&srq->free);
srq               237 drivers/net/ethernet/mellanox/mlx4/srq.c 	wait_for_completion(&srq->free);
srq               239 drivers/net/ethernet/mellanox/mlx4/srq.c 	mlx4_srq_free_icm(dev, srq->srqn);
srq               243 drivers/net/ethernet/mellanox/mlx4/srq.c int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark)
srq               245 drivers/net/ethernet/mellanox/mlx4/srq.c 	return mlx4_ARM_SRQ(dev, srq->srqn, limit_watermark);
srq               249 drivers/net/ethernet/mellanox/mlx4/srq.c int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_watermark)
srq               261 drivers/net/ethernet/mellanox/mlx4/srq.c 	err = mlx4_QUERY_SRQ(dev, mailbox, srq->srqn);
srq               300 drivers/net/ethernet/mellanox/mlx4/srq.c 	struct mlx4_srq *srq;
srq               303 drivers/net/ethernet/mellanox/mlx4/srq.c 	srq = radix_tree_lookup(&srq_table->tree,
srq               307 drivers/net/ethernet/mellanox/mlx4/srq.c 	return srq;
srq               491 drivers/net/wireless/intersil/orinoco/wext.c 				 struct iw_param *srq,
srq               512 drivers/net/wireless/intersil/orinoco/wext.c 	srq->value = val;
srq               513 drivers/net/wireless/intersil/orinoco/wext.c 	srq->fixed = 0; /* auto */
srq               520 drivers/net/wireless/intersil/orinoco/wext.c 				 struct iw_param *srq,
srq               524 drivers/net/wireless/intersil/orinoco/wext.c 	int val = srq->value;
srq              1102 drivers/net/wireless/zydas/zd1201.c     struct iw_request_info *info, struct iw_point *srq, char *extra)
srq              1109 drivers/net/wireless/zydas/zd1201.c     struct iw_request_info *info, struct iw_point *srq, char *extra)
srq              1194 drivers/net/wireless/zydas/zd1201.c 	srq->length = cev - extra;
srq              1195 drivers/net/wireless/zydas/zd1201.c 	srq->flags = 0;
srq               108 drivers/nvme/target/rdma.c 	struct ib_srq		*srq;
srq               464 drivers/nvme/target/rdma.c 	if (ndev->srq)
srq               465 drivers/nvme/target/rdma.c 		ret = ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
srq               845 drivers/nvme/target/rdma.c 	if (!ndev->srq)
srq               849 drivers/nvme/target/rdma.c 	ib_destroy_srq(ndev->srq);
srq               855 drivers/nvme/target/rdma.c 	struct ib_srq *srq;
srq               865 drivers/nvme/target/rdma.c 	srq = ib_create_srq(ndev->pd, &srq_attr);
srq               866 drivers/nvme/target/rdma.c 	if (IS_ERR(srq)) {
srq               881 drivers/nvme/target/rdma.c 	ndev->srq = srq;
srq               895 drivers/nvme/target/rdma.c 	ib_destroy_srq(srq);
srq              1015 drivers/nvme/target/rdma.c 	if (ndev->srq) {
srq              1016 drivers/nvme/target/rdma.c 		qp_attr.srq = ndev->srq;
srq              1035 drivers/nvme/target/rdma.c 	if (!ndev->srq) {
srq              1071 drivers/nvme/target/rdma.c 	if (!queue->dev->srq) {
srq              1189 drivers/nvme/target/rdma.c 	if (!ndev->srq) {
srq              1210 drivers/nvme/target/rdma.c 	if (!ndev->srq) {
srq               844 include/linux/mlx4/device.h 	int srq;
srq               933 include/linux/mlx4/device.h 		} __packed srq;
srq              1151 include/linux/mlx4/device.h 		   struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq);
srq              1152 include/linux/mlx4/device.h void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq);
srq              1153 include/linux/mlx4/device.h int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark);
srq              1154 include/linux/mlx4/device.h int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_watermark);
srq               143 include/rdma/ib_cm.h 	unsigned int		srq:1;
srq               157 include/rdma/ib_cm.h 	unsigned int		srq:1;
srq               398 include/rdma/ib_cm.h 	u8			srq;
srq               421 include/rdma/ib_cm.h 	u8		srq;
srq               723 include/rdma/ib_verbs.h 		struct ib_srq	*srq;
srq              1129 include/rdma/ib_verbs.h 	struct ib_srq	       *srq;
srq              1720 include/rdma/ib_verbs.h 	struct ib_srq	       *srq;
srq              2274 include/rdma/ib_verbs.h 	int (*post_srq_recv)(struct ib_srq *srq,
srq              2373 include/rdma/ib_verbs.h 	int (*create_srq)(struct ib_srq *srq,
srq              2376 include/rdma/ib_verbs.h 	int (*modify_srq)(struct ib_srq *srq, struct ib_srq_attr *srq_attr,
srq              2379 include/rdma/ib_verbs.h 	int (*query_srq)(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
srq              2380 include/rdma/ib_verbs.h 	void (*destroy_srq)(struct ib_srq *srq, struct ib_udata *udata);
srq              3524 include/rdma/ib_verbs.h int ib_modify_srq(struct ib_srq *srq,
srq              3534 include/rdma/ib_verbs.h int ib_query_srq(struct ib_srq *srq,
srq              3542 include/rdma/ib_verbs.h int ib_destroy_srq_user(struct ib_srq *srq, struct ib_udata *udata);
srq              3550 include/rdma/ib_verbs.h static inline int ib_destroy_srq(struct ib_srq *srq)
srq              3552 include/rdma/ib_verbs.h 	return ib_destroy_srq_user(srq, NULL);
srq              3562 include/rdma/ib_verbs.h static inline int ib_post_srq_recv(struct ib_srq *srq,
srq              3568 include/rdma/ib_verbs.h 	return srq->device->ops.post_srq_recv(srq, recv_wr,
srq                94 include/rdma/rdma_cm.h 	u8 srq;
srq               191 include/uapi/rdma/rdma_user_cm.h 	__u8  srq;
srq               333 net/smc/smc_ib.c 		.srq = NULL,
srq               502 net/sunrpc/xprtrdma/verbs.c 	ep->rep_attr.srq = NULL;