[infiniband] Assign names to queue pairs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2016-03-08 15:51:53 +00:00
parent 174bf6b569
commit 6a3ffa0114
6 changed files with 19 additions and 12 deletions
+4 -2
View File
@@ -346,6 +346,7 @@ void ib_destroy_madx ( struct ib_device *ibdev __unused,
struct ib_mad_interface * ib_create_mi ( struct ib_device *ibdev,
enum ib_queue_pair_type type ) {
struct ib_mad_interface *mi;
const char *name;
int rc;
/* Allocate and initialise fields */
@@ -363,16 +364,17 @@ struct ib_mad_interface * ib_create_mi ( struct ib_device *ibdev,
}
/* Create queue pair */
name = ( ( type == IB_QPT_SMI ) ? "SMI" : "GSI" );
mi->qp = ib_create_qp ( ibdev, type, IB_MI_NUM_SEND_WQES, mi->cq,
IB_MI_NUM_RECV_WQES, mi->cq,
&ib_mi_queue_pair_ops );
&ib_mi_queue_pair_ops, name );
if ( ! mi->qp ) {
DBGC ( mi, "MI %p could not allocate queue pair\n", mi );
goto err_create_qp;
}
ib_qp_set_ownerdata ( mi->qp, mi );
DBGC ( mi, "MI %p (%s) running on QPN %#lx\n",
mi, ( ( type == IB_QPT_SMI ) ? "SMI" : "GSI" ), mi->qp->qpn );
mi, mi->qp->name, mi->qp->qpn );
/* Set queue key */
mi->qp->qkey = ( ( type == IB_QPT_SMI ) ? IB_QKEY_SMI : IB_QKEY_GSI );