diff options
author | Michael Brown | 2009-07-07 15:03:11 +0200 |
---|---|---|
committer | Michael Brown | 2009-07-18 00:06:33 +0200 |
commit | b4155c4ab541693f35f2efe76d6dc75dd4cb7825 (patch) | |
tree | e90bc2a5f9b2213cb4bbdd837e161dd796b7f8d5 /src/net/infiniband.c | |
parent | [ipoib] Clarify new role of IPoIB peer cache as for MAC addresses only (diff) | |
download | ipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.tar.gz ipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.tar.xz ipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.zip |
[infiniband] Make qkey and rate optional parameters to ib_post_send()
The queue key is stored as a property of the queue pair, and so can
optionally be added by the Infiniband core at the time of calling
ib_post_send(), rather than always having to be specified by the
caller.
This allows IPoIB to avoid explicitly keeping track of the data queue
key.
Diffstat (limited to 'src/net/infiniband.c')
-rw-r--r-- | src/net/infiniband.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c index 497c20f6..369d490a 100644 --- a/src/net/infiniband.c +++ b/src/net/infiniband.c @@ -360,6 +360,12 @@ int ib_post_send ( struct ib_device *ibdev, struct ib_queue_pair *qp, return -ENOBUFS; } + /* Fill in optional parameters in address vector */ + if ( ! av->qkey ) + av->qkey = qp->qkey; + if ( ! av->rate ) + av->rate = IB_RATE_2_5; + /* Post to hardware */ if ( ( rc = ibdev->op->post_send ( ibdev, qp, av, iobuf ) ) != 0 ) { DBGC ( ibdev, "IBDEV %p QPN %#lx could not post send WQE: " |