diff options
author | Michael Brown | 2009-11-16 21:18:03 +0100 |
---|---|---|
committer | Michael Brown | 2009-11-16 23:13:25 +0100 |
commit | e7018228fab855677c9256ead2871c9e354d4df2 (patch) | |
tree | 6d1204e243eb1ca42895407720cceeb41cb98702 /src/net/infiniband | |
parent | [ipv4] Ignore non-open net devices when performing routing (diff) | |
download | ipxe-e7018228fab855677c9256ead2871c9e354d4df2.tar.gz ipxe-e7018228fab855677c9256ead2871c9e354d4df2.tar.xz ipxe-e7018228fab855677c9256ead2871c9e354d4df2.zip |
[infiniband] Make node description invariant across all ports
IBA section 14.2.5.2 states that "the contents of the NodeDescription
attribute are the same for all ports on a node". Satisfy this by
using the HCA GUID rather than the port GUID to form the node
description string.
Diffstat (limited to 'src/net/infiniband')
-rw-r--r-- | src/net/infiniband/ib_sma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net/infiniband/ib_sma.c b/src/net/infiniband/ib_sma.c index eb4f987a..562b0925 100644 --- a/src/net/infiniband/ib_sma.c +++ b/src/net/infiniband/ib_sma.c @@ -87,16 +87,17 @@ static void ib_sma_node_desc ( struct ib_device *ibdev, union ib_mad *mad, struct ib_address_vector *av ) { struct ib_node_desc *node_desc = &mad->smp.smp_data.node_desc; - struct ib_gid_half *guid = &ibdev->gid.u.half[1]; + struct ib_gid_half guid; int rc; /* Fill in information */ memset ( node_desc, 0, sizeof ( *node_desc ) ); + ib_get_hca_info ( ibdev, &guid ); snprintf ( node_desc->node_string, sizeof ( node_desc->node_string ), "gPXE %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x (%s)", - guid->u.bytes[0], guid->u.bytes[1], guid->u.bytes[2], - guid->u.bytes[3], guid->u.bytes[4], guid->u.bytes[5], - guid->u.bytes[6], guid->u.bytes[7], ibdev->dev->name ); + guid.u.bytes[0], guid.u.bytes[1], guid.u.bytes[2], + guid.u.bytes[3], guid.u.bytes[4], guid.u.bytes[5], + guid.u.bytes[6], guid.u.bytes[7], ibdev->dev->name ); /* Send GetResponse */ mad->hdr.method = IB_MGMT_METHOD_GET_RESP; |