diff options
author | Michael Brown | 2012-08-31 01:47:37 +0200 |
---|---|---|
committer | Michael Brown | 2012-08-31 22:22:58 +0200 |
commit | cbe41cb31be10edc234e96cf4291245c21272a57 (patch) | |
tree | 726646b6d2002dd10a3577ee120f8d27b5726484 /src/net/infiniband.c | |
parent | [infiniband] Allow queue pairs to have a custom allocator for receive iobufs (diff) | |
download | ipxe-cbe41cb31be10edc234e96cf4291245c21272a57.tar.gz ipxe-cbe41cb31be10edc234e96cf4291245c21272a57.tar.xz ipxe-cbe41cb31be10edc234e96cf4291245c21272a57.zip |
[infiniband] Use explicit "source" and "dest" address vector parameter names
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/infiniband.c')
-rw-r--r-- | src/net/infiniband.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c index a50b7a03..f50778d0 100644 --- a/src/net/infiniband.c +++ b/src/net/infiniband.c @@ -263,7 +263,6 @@ struct ib_queue_pair * ib_create_qp ( struct ib_device *ibdev, * * @v ibdev Infiniband device * @v qp Queue pair - * @v av New address vector, if applicable * @ret rc Return status code */ int ib_modify_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { @@ -384,14 +383,14 @@ struct ib_work_queue * ib_find_wq ( struct ib_completion_queue *cq, * * @v ibdev Infiniband device * @v qp Queue pair - * @v av Address vector + * @v dest Destination address vector * @v iobuf I/O buffer * @ret rc Return status code */ int ib_post_send ( struct ib_device *ibdev, struct ib_queue_pair *qp, - struct ib_address_vector *av, + struct ib_address_vector *dest, struct io_buffer *iobuf ) { - struct ib_address_vector av_copy; + struct ib_address_vector dest_copy; int rc; /* Check queue fill level */ @@ -402,21 +401,21 @@ int ib_post_send ( struct ib_device *ibdev, struct ib_queue_pair *qp, } /* Use default address vector if none specified */ - if ( ! av ) - av = &qp->av; + if ( ! dest ) + dest = &qp->av; /* Make modifiable copy of address vector */ - memcpy ( &av_copy, av, sizeof ( av_copy ) ); - av = &av_copy; + memcpy ( &dest_copy, dest, sizeof ( dest_copy ) ); + dest = &dest_copy; /* Fill in optional parameters in address vector */ - if ( ! av->qkey ) - av->qkey = qp->qkey; - if ( ! av->rate ) - av->rate = IB_RATE_2_5; + if ( ! dest->qkey ) + dest->qkey = qp->qkey; + if ( ! dest->rate ) + dest->rate = IB_RATE_2_5; /* Post to hardware */ - if ( ( rc = ibdev->op->post_send ( ibdev, qp, av, iobuf ) ) != 0 ) { + if ( ( rc = ibdev->op->post_send ( ibdev, qp, dest, iobuf ) ) != 0 ) { DBGC ( ibdev, "IBDEV %p QPN %#lx could not post send WQE: " "%s\n", ibdev, qp->qpn, strerror ( rc ) ); return rc; @@ -487,16 +486,16 @@ void ib_complete_send ( struct ib_device *ibdev, struct ib_queue_pair *qp, * * @v ibdev Infiniband device * @v qp Queue pair - * @v av Address vector, or NULL + * @v source Source address vector, or NULL * @v iobuf I/O buffer * @v rc Completion status code */ void ib_complete_recv ( struct ib_device *ibdev, struct ib_queue_pair *qp, - struct ib_address_vector *av, + struct ib_address_vector *source, struct io_buffer *iobuf, int rc ) { if ( qp->recv.cq->op->complete_recv ) { - qp->recv.cq->op->complete_recv ( ibdev, qp, av, iobuf, rc ); + qp->recv.cq->op->complete_recv ( ibdev, qp, source, iobuf, rc ); } else { free_iob ( iobuf ); } |