Browse Source

[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.
tags/v1.0.0-rc1
Michael Brown 15 years ago
parent
commit
e7018228fa
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      src/net/infiniband/ib_sma.c

+ 5
- 4
src/net/infiniband/ib_sma.c View File

87
 			       union ib_mad *mad,
87
 			       union ib_mad *mad,
88
 			       struct ib_address_vector *av ) {
88
 			       struct ib_address_vector *av ) {
89
 	struct ib_node_desc *node_desc = &mad->smp.smp_data.node_desc;
89
 	struct ib_node_desc *node_desc = &mad->smp.smp_data.node_desc;
90
-	struct ib_gid_half *guid = &ibdev->gid.u.half[1];
90
+	struct ib_gid_half guid;
91
 	int rc;
91
 	int rc;
92
 
92
 
93
 	/* Fill in information */
93
 	/* Fill in information */
94
 	memset ( node_desc, 0, sizeof ( *node_desc ) );
94
 	memset ( node_desc, 0, sizeof ( *node_desc ) );
95
+	ib_get_hca_info ( ibdev, &guid );
95
 	snprintf ( node_desc->node_string, sizeof ( node_desc->node_string ),
96
 	snprintf ( node_desc->node_string, sizeof ( node_desc->node_string ),
96
 		   "gPXE %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x (%s)",
97
 		   "gPXE %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x (%s)",
97
-		   guid->u.bytes[0], guid->u.bytes[1], guid->u.bytes[2],
98
-		   guid->u.bytes[3], guid->u.bytes[4], guid->u.bytes[5],
99
-		   guid->u.bytes[6], guid->u.bytes[7], ibdev->dev->name );
98
+		   guid.u.bytes[0], guid.u.bytes[1], guid.u.bytes[2],
99
+		   guid.u.bytes[3], guid.u.bytes[4], guid.u.bytes[5],
100
+		   guid.u.bytes[6], guid.u.bytes[7], ibdev->dev->name );
100
 
101
 
101
 	/* Send GetResponse */
102
 	/* Send GetResponse */
102
 	mad->hdr.method = IB_MGMT_METHOD_GET_RESP;
103
 	mad->hdr.method = IB_MGMT_METHOD_GET_RESP;

Loading…
Cancel
Save