aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/infiniband.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-09-15 23:10:15 +0100
committerMichael Brown <mcb30@ipxe.org>2010-09-16 03:30:45 +0100
commit42cf4a720cb85f71d43739b304cc1f25353f68c4 (patch)
tree5f6d9d242ae34c97dddfc580b850644edfd36d55 /src/net/infiniband.c
parent3e8e2773de7acd47084c04205385e294c7825020 (diff)
downloadipxe-42cf4a720cb85f71d43739b304cc1f25353f68c4.tar.gz
[infiniband] Add node GUID as distinct from the first port GUID
iPXE currently uses the first port's port GUID as the node GUID, rather than using the (possibly distinct) real node GUID. This can confuse opensm during the handover to a loaded OS: it thinks the port already belongs to a different node and so discards our port information with a warning message about duplicate ports. Everything is picked up correctly on the second subnet sweep, after opensm has established that the "old" node no longer exists, but this can delay link-up unnecessarily by several seconds. Fix by using the real node GUID. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/infiniband.c')
-rw-r--r--src/net/infiniband.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c
index d7cbf697a..72dd4855a 100644
--- a/src/net/infiniband.c
+++ b/src/net/infiniband.c
@@ -761,27 +761,21 @@ void ib_mcast_detach ( struct ib_device *ibdev, struct ib_queue_pair *qp,
*/
/**
- * Get Infiniband HCA information
+ * Count Infiniband HCA ports
*
* @v ibdev Infiniband device
- * @ret hca_guid HCA GUID
* @ret num_ports Number of ports
*/
-int ib_get_hca_info ( struct ib_device *ibdev, union ib_guid *hca_guid ) {
+int ib_count_ports ( struct ib_device *ibdev ) {
struct ib_device *tmp;
int num_ports = 0;
/* Search for IB devices with the same physical device to
- * identify port count and a suitable Node GUID.
+ * identify port count.
*/
for_each_ibdev ( tmp ) {
- if ( tmp->dev != ibdev->dev )
- continue;
- if ( num_ports == 0 ) {
- memcpy ( hca_guid, &tmp->gid.s.guid,
- sizeof ( *hca_guid ) );
- }
- num_ports++;
+ if ( tmp->dev == ibdev->dev )
+ num_ports++;
}
return num_ports;
}