diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-10-19 15:04:01 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 19:57:03 -0800 |
commit | 4b1872a054537a0ab71bf5636c0bf048e3490299 (patch) | |
tree | eb340c22e68f0cc0d53139cb068ef2e2e2f66390 | |
parent | 0acfd5d0550d3b3615b7bc34fc312a8c92b53fa3 (diff) | |
download | libmthca-4b1872a054537a0ab71bf5636c0bf048e3490299.tar.gz |
Get rid of struct mthca_qp.qpt
Use libibverbs struct ibv_qp.qp_type field instead of keeping our own
struct mthca_qp.qpt field.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/mthca.h | 1 | ||||
-rw-r--r-- | src/qp.c | 8 | ||||
-rw-r--r-- | src/verbs.c | 2 |
4 files changed, 12 insertions, 7 deletions
@@ -1,3 +1,11 @@ +2005-10-19 Roland Dreier <roland@cisco.com> + + * src/mthca.h, src/verbs.c (mthca_create_qp), src/qp.c + (mthca_tavor_post_send, mthca_arbel_post_send, mthca_alloc_qp_buf, + mthca_return_cap): Eliminate struct mthca_qp.qpt field and use + struct ibv_qp.qp_type instead (now that that field has been added + in libibverbs). + 2005-10-18 Roland Dreier <roland@cisco.com> * src/cq.c (handle_error_cqe, mthca_poll_one): Dump CQEs for local diff --git a/src/mthca.h b/src/mthca.h index af03de6..9ef2fdf 100644 --- a/src/mthca.h +++ b/src/mthca.h @@ -181,7 +181,6 @@ struct mthca_qp { struct mthca_wq sq; struct mthca_wq rq; struct ibv_mr *mr; - enum ibv_qp_type qpt; int sq_sig_all; }; @@ -122,7 +122,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, wqe += sizeof (struct mthca_next_seg); size = sizeof (struct mthca_next_seg) / 16; - switch (qp->qpt) { + switch (ibqp->qp_type) { case IBV_QPT_RC: switch (wr->opcode) { case IBV_WR_ATOMIC_CMP_AND_SWP: @@ -423,7 +423,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, wqe += sizeof (struct mthca_next_seg); size = sizeof (struct mthca_next_seg) / 16; - switch (qp->qpt) { + switch (ibqp->qp_type) { case IBV_QPT_RC: switch (wr->opcode) { case IBV_WR_ATOMIC_CMP_AND_SWP: @@ -703,7 +703,7 @@ int mthca_alloc_qp_buf(struct ibv_pd *pd, struct ibv_qp_cap *cap, size = sizeof (struct mthca_next_seg) + qp->sq.max_gs * sizeof (struct mthca_data_seg); - switch (qp->qpt) { + switch (qp->ibv_qp.qp_type) { case IBV_QPT_UD: if (mthca_is_memfree(pd->context)) size += sizeof (struct mthca_arbel_ud_seg); @@ -777,7 +777,7 @@ void mthca_return_cap(struct ibv_pd *pd, struct mthca_qp *qp, struct ibv_qp_cap sizeof (struct mthca_next_seg) - sizeof (struct mthca_inline_seg); - switch (qp->qpt) { + switch (qp->ibv_qp.qp_type) { case IBV_QPT_UD: if (mthca_is_memfree(pd->context)) cap->max_inline_data -= sizeof (struct mthca_arbel_ud_seg); diff --git a/src/verbs.c b/src/verbs.c index 24638ac..e0b38dc 100644 --- a/src/verbs.c +++ b/src/verbs.c @@ -412,8 +412,6 @@ struct ibv_qp *mthca_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr) if (!qp) return NULL; - qp->qpt = attr->qp_type; - qp->sq.max = align_queue_size(pd->context, attr->cap.max_send_wr, 0); qp->sq.next_ind = 0; qp->sq.last_comp = qp->sq.max - 1; |