mirror of
https://github.com/ipxe/ipxe
synced 2026-02-08 22:03:27 +03:00
[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.
This commit is contained in:
@@ -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: "
|
||||
|
||||
Reference in New Issue
Block a user