ソースを参照

[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年前
コミット
e7018228fa
1個のファイルの変更5行の追加4行の削除
  1. 5
    4
      src/net/infiniband/ib_sma.c

+ 5
- 4
src/net/infiniband/ib_sma.c ファイルの表示

@@ -87,16 +87,17 @@ static void ib_sma_node_desc ( struct ib_device *ibdev,
87 87
 			       union ib_mad *mad,
88 88
 			       struct ib_address_vector *av ) {
89 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 91
 	int rc;
92 92
 
93 93
 	/* Fill in information */
94 94
 	memset ( node_desc, 0, sizeof ( *node_desc ) );
95
+	ib_get_hca_info ( ibdev, &guid );
95 96
 	snprintf ( node_desc->node_string, sizeof ( node_desc->node_string ),
96 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 102
 	/* Send GetResponse */
102 103
 	mad->hdr.method = IB_MGMT_METHOD_GET_RESP;

読み込み中…
キャンセル
保存