staging/rdma/hfi1: Remove srq from hfi1
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Tue, 19 Jan 2016 22:42:33 +0000 (14:42 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:38 +0000 (20:37 -0500)
SRQ data structure has been moved to rdmavt. Make use of it.

Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/qp.c
drivers/staging/rdma/hfi1/ruc.c
drivers/staging/rdma/hfi1/srq.c
drivers/staging/rdma/hfi1/verbs.h

index 5a6845509d16f5721db365d9ed0d5890e8c3e884..0f00365f899dceef95d1b82814cb4a3d1c57e5a2 100644 (file)
@@ -1092,7 +1092,7 @@ struct ib_qp *hfi1_create_qp(struct ib_pd *ibpd,
                sz = sizeof(*qp);
                sg_list_sz = 0;
                if (init_attr->srq) {
-                       struct hfi1_srq *srq = to_isrq(init_attr->srq);
+                       struct rvt_srq *srq = ibsrq_to_rvtsrq(init_attr->srq);
 
                        if (srq->rq.max_sge > 1)
                                sg_list_sz = sizeof(*qp->r_sg_list) *
index 762fca9d9ad4e4d7e2981c9db48d0c01782cc95c..3b2f032b9dea455ebe73abfae51dff67ef5e22c8 100644 (file)
@@ -159,14 +159,14 @@ int hfi1_get_rwqe(struct rvt_qp *qp, int wr_id_only)
        unsigned long flags;
        struct rvt_rq *rq;
        struct rvt_rwq *wq;
-       struct hfi1_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 {
index 932bd96073ca0240c37f8f245dd58f844f29d8ea..78f190a266a574191e85c6d04897cf0f88427bb0 100644 (file)
@@ -65,7 +65,7 @@
 int hfi1_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
                          struct ib_recv_wr **bad_wr)
 {
-       struct hfi1_srq *srq = to_isrq(ibsrq);
+       struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
        struct rvt_rwq *wq;
        unsigned long flags;
        int ret;
@@ -120,7 +120,7 @@ struct ib_srq *hfi1_create_srq(struct ib_pd *ibpd,
                               struct ib_udata *udata)
 {
        struct hfi1_ibdev *dev = to_idev(ibpd->device);
-       struct hfi1_srq *srq;
+       struct rvt_srq *srq;
        u32 sz;
        struct ib_srq *ret;
 
@@ -229,7 +229,7 @@ int hfi1_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
                    enum ib_srq_attr_mask attr_mask,
                    struct ib_udata *udata)
 {
-       struct hfi1_srq *srq = to_isrq(ibsrq);
+       struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
        struct rvt_rwq *wq;
        int ret = 0;
 
@@ -367,7 +367,7 @@ bail:
 
 int hfi1_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
 {
-       struct hfi1_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;
@@ -381,7 +381,7 @@ int hfi1_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
  */
 int hfi1_destroy_srq(struct ib_srq *ibsrq)
 {
-       struct hfi1_srq *srq = to_isrq(ibsrq);
+       struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
        struct hfi1_ibdev *dev = to_idev(ibsrq->device);
 
        spin_lock(&dev->n_srqs_lock);
index 0782a85f5d2895f8690e1dd23780800600f0938c..97df555e62b52091d6ddb7d3e61c0a0a804e0717 100644 (file)
@@ -263,14 +263,6 @@ struct hfi1_cq {
        struct rvt_mmap_info *ip;
 };
 
-struct hfi1_srq {
-       struct ib_srq ibsrq;
-       struct rvt_rq rq;
-       struct rvt_mmap_info *ip;
-       /* send signal when number of RWQEs < limit */
-       u32 limit;
-};
-
 /*
  * hfi1 specific data structures that will be hidden from rvt after the queue
  * pair is made common
@@ -539,11 +531,6 @@ static inline struct hfi1_cq *to_icq(struct ib_cq *ibcq)
        return container_of(ibcq, struct hfi1_cq, ibcq);
 }
 
-static inline struct hfi1_srq *to_isrq(struct ib_srq *ibsrq)
-{
-       return container_of(ibsrq, struct hfi1_srq, ibsrq);
-}
-
 static inline struct rvt_qp *to_iqp(struct ib_qp *ibqp)
 {
        return container_of(ibqp, struct rvt_qp, ibqp);