unsigned long flags;
struct rvt_rq *rq;
struct rvt_rwq *wq;
- struct qib_srq *srq;
+ struct rvt_srq *srq;
struct rvt_rwqe *wqe;
void (*handler)(struct ib_event *, void *);
u32 tail;
int ret;
if (qp->ibqp.srq) {
- srq = to_isrq(qp->ibqp.srq);
+ srq = ibsrq_to_rvtsrq(qp->ibqp.srq);
handler = srq->ibsrq.event_handler;
rq = &srq->rq;
} else {
int qib_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
struct ib_recv_wr **bad_wr)
{
- struct qib_srq *srq = to_isrq(ibsrq);
+ struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
struct rvt_rwq *wq;
unsigned long flags;
int ret;
struct ib_udata *udata)
{
struct qib_ibdev *dev = to_idev(ibpd->device);
- struct qib_srq *srq;
+ struct rvt_srq *srq;
u32 sz;
struct ib_srq *ret;
enum ib_srq_attr_mask attr_mask,
struct ib_udata *udata)
{
- struct qib_srq *srq = to_isrq(ibsrq);
+ struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
struct rvt_rwq *wq;
int ret = 0;
int qib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
{
- struct qib_srq *srq = to_isrq(ibsrq);
+ struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
attr->max_wr = srq->rq.size - 1;
attr->max_sge = srq->rq.max_sge;
*/
int qib_destroy_srq(struct ib_srq *ibsrq)
{
- struct qib_srq *srq = to_isrq(ibsrq);
+ struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
struct qib_ibdev *dev = to_idev(ibsrq->device);
spin_lock(&dev->n_srqs_lock);
struct rvt_mmap_info *ip;
};
-struct qib_srq {
- struct ib_srq ibsrq;
- struct rvt_rq rq;
- struct rvt_mmap_info *ip;
- /* send signal when number of RWQEs < limit */
- u32 limit;
-};
-
/*
* qib specific data structure that will be hidden from rvt after the queue pair
* is made common.
return container_of(ibcq, struct qib_cq, ibcq);
}
-static inline struct qib_srq *to_isrq(struct ib_srq *ibsrq)
-{
- return container_of(ibsrq, struct qib_srq, ibsrq);
-}
-
static inline struct rvt_qp *to_iqp(struct ib_qp *ibqp)
{
return container_of(ibqp, struct rvt_qp, ibqp);