[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
+1 -1
View File
@@ -435,7 +435,7 @@ int ib_cmrc_open ( struct interface *xfer, struct ib_device *ibdev,
/* Create queue pair */
cmrc->qp = ib_create_qp ( ibdev, IB_QPT_RC, IB_CMRC_NUM_SEND_WQES,
cmrc->cq, IB_CMRC_NUM_RECV_WQES, cmrc->cq,
&ib_cmrc_queue_pair_ops );
&ib_cmrc_queue_pair_ops, name );
if ( ! cmrc->qp ) {
DBGC ( cmrc, "CMRC %s %s could not create queue pair\n",
ibdev->name, cmrc->name );
+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 );