Commit 894c727b authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford

IB/qib: Remove srq from qib

Remove srq from qib now that it has been moved into rdmavt.
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: default avatarHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 96ab1ac1
...@@ -1046,7 +1046,7 @@ struct ib_qp *qib_create_qp(struct ib_pd *ibpd, ...@@ -1046,7 +1046,7 @@ struct ib_qp *qib_create_qp(struct ib_pd *ibpd,
sz = sizeof(*qp); sz = sizeof(*qp);
sg_list_sz = 0; sg_list_sz = 0;
if (init_attr->srq) { if (init_attr->srq) {
struct qib_srq *srq = to_isrq(init_attr->srq); struct rvt_srq *srq = ibsrq_to_rvtsrq(init_attr->srq);
if (srq->rq.max_sge > 1) if (srq->rq.max_sge > 1)
sg_list_sz = sizeof(*qp->r_sg_list) * sg_list_sz = sizeof(*qp->r_sg_list) *
......
...@@ -141,14 +141,14 @@ int qib_get_rwqe(struct rvt_qp *qp, int wr_id_only) ...@@ -141,14 +141,14 @@ int qib_get_rwqe(struct rvt_qp *qp, int wr_id_only)
unsigned long flags; unsigned long flags;
struct rvt_rq *rq; struct rvt_rq *rq;
struct rvt_rwq *wq; struct rvt_rwq *wq;
struct qib_srq *srq; struct rvt_srq *srq;
struct rvt_rwqe *wqe; struct rvt_rwqe *wqe;
void (*handler)(struct ib_event *, void *); void (*handler)(struct ib_event *, void *);
u32 tail; u32 tail;
int ret; int ret;
if (qp->ibqp.srq) { if (qp->ibqp.srq) {
srq = to_isrq(qp->ibqp.srq); srq = ibsrq_to_rvtsrq(qp->ibqp.srq);
handler = srq->ibsrq.event_handler; handler = srq->ibsrq.event_handler;
rq = &srq->rq; rq = &srq->rq;
} else { } else {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
int qib_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr, int qib_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
struct ib_recv_wr **bad_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; struct rvt_rwq *wq;
unsigned long flags; unsigned long flags;
int ret; int ret;
...@@ -103,7 +103,7 @@ struct ib_srq *qib_create_srq(struct ib_pd *ibpd, ...@@ -103,7 +103,7 @@ struct ib_srq *qib_create_srq(struct ib_pd *ibpd,
struct ib_udata *udata) struct ib_udata *udata)
{ {
struct qib_ibdev *dev = to_idev(ibpd->device); struct qib_ibdev *dev = to_idev(ibpd->device);
struct qib_srq *srq; struct rvt_srq *srq;
u32 sz; u32 sz;
struct ib_srq *ret; struct ib_srq *ret;
...@@ -212,7 +212,7 @@ int qib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, ...@@ -212,7 +212,7 @@ int qib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
enum ib_srq_attr_mask attr_mask, enum ib_srq_attr_mask attr_mask,
struct ib_udata *udata) struct ib_udata *udata)
{ {
struct qib_srq *srq = to_isrq(ibsrq); struct rvt_srq *srq = ibsrq_to_rvtsrq(ibsrq);
struct rvt_rwq *wq; struct rvt_rwq *wq;
int ret = 0; int ret = 0;
...@@ -350,7 +350,7 @@ int qib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, ...@@ -350,7 +350,7 @@ int qib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
int qib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr) 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_wr = srq->rq.size - 1;
attr->max_sge = srq->rq.max_sge; attr->max_sge = srq->rq.max_sge;
...@@ -364,7 +364,7 @@ int qib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr) ...@@ -364,7 +364,7 @@ int qib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
*/ */
int qib_destroy_srq(struct ib_srq *ibsrq) 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); struct qib_ibdev *dev = to_idev(ibsrq->device);
spin_lock(&dev->n_srqs_lock); spin_lock(&dev->n_srqs_lock);
......
...@@ -251,14 +251,6 @@ struct qib_cq { ...@@ -251,14 +251,6 @@ struct qib_cq {
struct rvt_mmap_info *ip; 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 * qib specific data structure that will be hidden from rvt after the queue pair
* is made common. * is made common.
...@@ -539,11 +531,6 @@ static inline struct qib_cq *to_icq(struct ib_cq *ibcq) ...@@ -539,11 +531,6 @@ static inline struct qib_cq *to_icq(struct ib_cq *ibcq)
return container_of(ibcq, struct qib_cq, ibcq); 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) static inline struct rvt_qp *to_iqp(struct ib_qp *ibqp)
{ {
return container_of(ibqp, struct rvt_qp, ibqp); return container_of(ibqp, struct rvt_qp, ibqp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment