mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 11:00:27 +03:00
[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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user