Преглед на файлове

Obtains a response to the get path record!

tags/v0.9.3
Michael Brown преди 16 години
родител
ревизия
b3d3814c17
променени са 5 файла, в които са добавени 276 реда и са изтрити 17 реда
  1. 172
    9
      src/drivers/net/ipoib.c
  2. 4
    1
      src/drivers/net/mlx_ipoib/ib_mad.c
  3. 1
    1
      src/drivers/net/mlx_ipoib/ib_mad.h
  4. 37
    5
      src/drivers/net/mlx_ipoib/mt25218.c
  5. 62
    1
      src/include/gpxe/infiniband.h

+ 172
- 9
src/drivers/net/ipoib.c Целия файл

@@ -44,15 +44,24 @@ extern struct ib_address_vector hack_ipoib_bcast_av;
44 44
 /** IPoIB MTU */
45 45
 #define IPOIB_MTU 2048
46 46
 
47
-/** Number of IPoIB send work queue entries */
47
+/** Number of IPoIB data send work queue entries */
48 48
 #define IPOIB_DATA_NUM_SEND_WQES 4
49 49
 
50
-/** Number of IPoIB receive work queue entries */
51
-#define IPOIB_DATA_NUM_RECV_WQES 8
50
+/** Number of IPoIB data receive work queue entries */
51
+#define IPOIB_DATA_NUM_RECV_WQES 4
52 52
 
53
-/** Number of IPoIB completion entries */
53
+/** Number of IPoIB data completion entries */
54 54
 #define IPOIB_DATA_NUM_CQES 8
55 55
 
56
+/** Number of IPoIB metadata send work queue entries */
57
+#define IPOIB_META_NUM_SEND_WQES 4
58
+
59
+/** Number of IPoIB metadata receive work queue entries */
60
+#define IPOIB_META_NUM_RECV_WQES 4
61
+
62
+/** Number of IPoIB metadata completion entries */
63
+#define IPOIB_META_NUM_CQES 8
64
+
56 65
 /** An IPoIB queue set */
57 66
 struct ipoib_queue_set {
58 67
 	/** Completion queue */
@@ -84,10 +93,15 @@ struct ipoib_device {
84 93
  ****************************************************************************
85 94
  */
86 95
 
96
+/** Broadcast QPN used in IPoIB MAC addresses
97
+ *
98
+ * This is a guaranteed invalid real QPN
99
+ */
100
+#define IPOIB_BROADCAST_QPN 0xffffffffUL
101
+
87 102
 /** Broadcast IPoIB address */
88 103
 static struct ipoib_mac ipoib_broadcast = {
89
-	.gid = { { 0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
90
-		   0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff } },
104
+	.qpn = ntohl ( IPOIB_BROADCAST_QPN ),
91 105
 };
92 106
 
93 107
 /**
@@ -244,6 +258,73 @@ static int ipoib_create_qset ( struct ipoib_device *ipoib,
244 258
 	return rc;
245 259
 }
246 260
 
261
+/**
262
+ * Transmit path record request
263
+ *
264
+ * @v ipoib		IPoIB device
265
+ * @v gid		Destination GID
266
+ * @ret rc		Return status code
267
+ */
268
+static int ipoib_get_path_record ( struct ipoib_device *ipoib,
269
+				   struct ib_gid *gid ) {
270
+	struct ib_device *ibdev = ipoib->ibdev;
271
+	struct io_buffer *iobuf;
272
+	struct ib_mad_path_record *path_record;
273
+	struct ib_address_vector av;
274
+ 	static uint32_t tid = 0;
275
+	int rc;
276
+
277
+	DBG ( "get_path_record():\n" );
278
+	int get_path_record(struct ib_gid *dgid, uint16_t *dlid_p,
279
+			    uint8_t *sl_p, uint8_t *rate_p);
280
+	uint16_t tmp_dlid;
281
+	uint8_t tmp_sl;
282
+	uint8_t tmp_rate;
283
+	get_path_record ( gid, &tmp_dlid, &tmp_sl, &tmp_rate );
284
+
285
+	DBG ( "ipoib_get_path_record():\n" );
286
+
287
+	/* Allocate I/O buffer */
288
+	iobuf = alloc_iob ( sizeof ( *path_record ) );
289
+	if ( ! iobuf )
290
+		return -ENOMEM;
291
+	iob_put ( iobuf, sizeof ( *path_record ) );
292
+	path_record = iobuf->data;
293
+	memset ( path_record, 0, sizeof ( *path_record ) );
294
+
295
+	/* Construct path record request */
296
+	path_record->mad_hdr.base_version = IB_MGMT_BASE_VERSION;
297
+	path_record->mad_hdr.mgmt_class = IB_MGMT_CLASS_SUBN_ADM;
298
+	path_record->mad_hdr.class_version = 2;
299
+	path_record->mad_hdr.method = IB_MGMT_METHOD_GET;
300
+	path_record->mad_hdr.attr_id = htons ( IB_SA_ATTR_PATH_REC );
301
+	path_record->mad_hdr.tid = tid++;
302
+	path_record->sa_hdr.comp_mask[1] =
303
+		htonl ( IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID );
304
+	memcpy ( &path_record->dgid, gid, sizeof ( path_record->dgid ) );
305
+	memcpy ( &path_record->sgid, &ibdev->port_gid,
306
+		 sizeof ( path_record->sgid ) );
307
+
308
+	DBG_HD ( path_record, sizeof ( *path_record ) );
309
+
310
+	/* Construct address vector */
311
+	memset ( &av, 0, sizeof ( av ) );
312
+	av.dlid = ibdev->sm_lid;
313
+	av.dest_qp = IB_SA_QPN;
314
+	av.qkey = IB_SA_QKEY;
315
+
316
+	/* Post send request */
317
+	if ( ( rc = ib_post_send ( ibdev, ipoib->meta.qp, &av,
318
+				   iobuf ) ) != 0 ) {
319
+		DBGC ( ipoib, "IPoIB %p could not send get path record: %s\n",
320
+		       ipoib, strerror ( rc ) );
321
+		free_iob ( iobuf );
322
+		return rc;
323
+	}
324
+
325
+	return 0;
326
+}
327
+
247 328
 /**
248 329
  * Transmit packet via IPoIB network device
249 330
  *
@@ -256,19 +337,29 @@ static int ipoib_transmit ( struct net_device *netdev,
256 337
 	struct ipoib_device *ipoib = netdev->priv;
257 338
 	struct ib_device *ibdev = ipoib->ibdev;
258 339
 	struct ipoib_pseudo_hdr *ipoib_pshdr = iobuf->data;
340
+	int rc;
259 341
 
260 342
 	if ( iob_len ( iobuf ) < sizeof ( *ipoib_pshdr ) ) {
261 343
 		DBGC ( ipoib, "IPoIB %p buffer too short\n", ipoib );
262 344
 		return -EINVAL;
263 345
 	}
264 346
 
347
+	DBG ( "TX pseudo-header:\n" );
348
+	DBG_HD ( ipoib_pshdr, sizeof ( *ipoib_pshdr ) );
349
+	if ( ipoib_pshdr->peer.qpn != htonl ( IPOIB_BROADCAST_QPN ) ) {
350
+		DBG ( "Get path record\n" );
351
+		rc = ipoib_get_path_record ( ipoib, &ipoib_pshdr->peer.gid );
352
+		free_iob ( iobuf );
353
+		return 0;
354
+	}
355
+
265 356
 	iob_pull ( iobuf, ( sizeof ( *ipoib_pshdr ) ) );
266 357
 	return ib_post_send ( ibdev, ipoib->data.qp,
267 358
 			      &hack_ipoib_bcast_av, iobuf );
268 359
 }
269 360
 
270 361
 /**
271
- * Handle IPoIB send completion
362
+ * Handle IPoIB data send completion
272 363
  *
273 364
  * @v ibdev		Infiniband device
274 365
  * @v qp		Queue pair
@@ -286,7 +377,7 @@ static void ipoib_data_complete_send ( struct ib_device *ibdev __unused,
286 377
 }
287 378
 
288 379
 /**
289
- * Handle IPoIB receive completion
380
+ * Handle IPoIB data receive completion
290 381
  *
291 382
  * @v ibdev		Infiniband device
292 383
  * @v qp		Queue pair
@@ -315,6 +406,61 @@ static void ipoib_data_complete_recv ( struct ib_device *ibdev __unused,
315 406
 	ipoib->data.recv_fill--;
316 407
 }
317 408
 
409
+/**
410
+ * Handle IPoIB metadata send completion
411
+ *
412
+ * @v ibdev		Infiniband device
413
+ * @v qp		Queue pair
414
+ * @v completion	Completion
415
+ * @v iobuf		I/O buffer
416
+ */
417
+static void ipoib_meta_complete_send ( struct ib_device *ibdev __unused,
418
+				       struct ib_queue_pair *qp,
419
+				       struct ib_completion *completion,
420
+				       struct io_buffer *iobuf ) {
421
+	struct net_device *netdev = qp->owner_priv;
422
+	struct ipoib_device *ipoib = netdev->priv;
423
+
424
+	DBG ( "Woohoo! METADATA TX completion\n" );
425
+
426
+
427
+	if ( completion->syndrome ) {
428
+		DBGC ( ipoib, "IPoIB %p metadata TX completion error %x\n",
429
+		       ipoib, completion->syndrome );
430
+	}
431
+	free_iob ( iobuf );
432
+}
433
+
434
+/**
435
+ * Handle IPoIB metadata receive completion
436
+ *
437
+ * @v ibdev		Infiniband device
438
+ * @v qp		Queue pair
439
+ * @v completion	Completion
440
+ * @v iobuf		I/O buffer
441
+ */
442
+static void ipoib_meta_complete_recv ( struct ib_device *ibdev __unused,
443
+				       struct ib_queue_pair *qp,
444
+				       struct ib_completion *completion,
445
+				       struct io_buffer *iobuf ) {
446
+	struct net_device *netdev = qp->owner_priv;
447
+	struct ipoib_device *ipoib = netdev->priv;
448
+
449
+	DBG ( "***************** META TX!!!!!! ********\n" );
450
+
451
+	if ( completion->syndrome ) {
452
+		DBGC ( ipoib, "IPoIB %p metadata RX completion error %x\n",
453
+		       ipoib, completion->syndrome );
454
+	} else {
455
+		iob_put ( iobuf, completion->len );
456
+		DBG ( "Metadata RX:\n" );
457
+		DBG_HD ( iobuf->data, iob_len ( iobuf ) );
458
+	}
459
+
460
+	ipoib->meta.recv_fill--;
461
+	free_iob ( iobuf );
462
+}
463
+
318 464
 /**
319 465
  * Refill IPoIB receive ring
320 466
  *
@@ -349,6 +495,9 @@ static void ipoib_poll ( struct net_device *netdev ) {
349 495
 
350 496
 	ib_poll_cq ( ibdev, ipoib->data.cq, ipoib_data_complete_send,
351 497
 		     ipoib_data_complete_recv );
498
+	ib_poll_cq ( ibdev, ipoib->meta.cq, ipoib_meta_complete_send,
499
+		     ipoib_meta_complete_recv );
500
+	ipoib_refill_recv ( ipoib, &ipoib->meta );
352 501
 	ipoib_refill_recv ( ipoib, &ipoib->data );
353 502
 }
354 503
 
@@ -382,7 +531,8 @@ static int ipoib_open ( struct net_device *netdev ) {
382 531
 		return rc;
383 532
 	}
384 533
 
385
-	/* Fill receive ring */
534
+	/* Fill receive rings */
535
+	ipoib_refill_recv ( ipoib, &ipoib->meta );
386 536
 	ipoib_refill_recv ( ipoib, &ipoib->data );
387 537
 
388 538
 	return 0;
@@ -436,6 +586,17 @@ int ipoib_probe ( struct ib_device *ibdev ) {
436 586
 	ipoib->netdev = netdev;
437 587
 	ipoib->ibdev = ibdev;
438 588
 
589
+	/* Allocate metadata queue set */
590
+	if ( ( rc = ipoib_create_qset ( ipoib, &ipoib->meta,
591
+					IPOIB_META_NUM_CQES,
592
+					IPOIB_META_NUM_SEND_WQES,
593
+					IPOIB_META_NUM_RECV_WQES,
594
+					IB_SA_QKEY ) ) != 0 ) {
595
+		DBGC ( ipoib, "IPoIB %p could not allocate metadata QP: %s\n",
596
+		       ipoib, strerror ( rc ) );
597
+		goto err_create_meta_qset;
598
+	}
599
+
439 600
 	/* Allocate data queue set */
440 601
 	if ( ( rc = ipoib_create_qset ( ipoib, &ipoib->data,
441 602
 					IPOIB_DATA_NUM_CQES,
@@ -461,6 +622,8 @@ int ipoib_probe ( struct ib_device *ibdev ) {
461 622
  err_register_netdev:
462 623
 	ipoib_destroy_qset ( ipoib, &ipoib->data );
463 624
  err_create_data_qset:
625
+	ipoib_destroy_qset ( ipoib, &ipoib->meta );
626
+ err_create_meta_qset:
464 627
 	netdev_nullify ( netdev );
465 628
 	netdev_put ( netdev );
466 629
 	return rc;

+ 4
- 1
src/drivers/net/mlx_ipoib/ib_mad.c Целия файл

@@ -264,7 +264,7 @@ static int join_mc_group(__u32 * qkey_p, __u16 * mlid_p, __u8 join)
264 264
 	return is_good ? 0 : -1;
265 265
 }
266 266
 
267
-static int get_path_record(union ib_gid_u *dgid, __u16 * dlid_p, u8 * sl_p,
267
+int get_path_record(union ib_gid_u *dgid, __u16 * dlid_p, u8 * sl_p,
268 268
 			   u8 * rate_p)
269 269
 {
270 270
 	struct path_record_mad_st *mad, *rcv_mad;
@@ -321,6 +321,9 @@ static int get_path_record(union ib_gid_u *dgid, __u16 * dlid_p, u8 * sl_p,
321 321
 	cpu_to_be_buf(mad, sizeof *mad);
322 322
 	memcpy(mad->path_record.sgid.raw, ib_data.port_gid.raw, 16);
323 323
 
324
+	DBG ( "data:\n" );
325
+	DBG_HD ( mad, sizeof ( *mad ) );
326
+
324 327
 	rc = post_send_req(qp, snd_wqe, 1);
325 328
 	if (rc) {
326 329
 		eprintf("");

+ 1
- 1
src/drivers/net/mlx_ipoib/ib_mad.h Целия файл

@@ -104,7 +104,7 @@ union mad_u {
104 104
 	struct ib_mad_st mad;
105 105
 } __attribute__ ((packed));
106 106
 
107
-static int get_path_record(union ib_gid_u *dgid, __u16 * dlid_p, __u8 * sl_p,
107
+int get_path_record(union ib_gid_u *dgid, __u16 * dlid_p, __u8 * sl_p,
108 108
 			   __u8 * rate_p);
109 109
 
110 110
 #endif				/* __ib_mad_h__ */

+ 37
- 5
src/drivers/net/mlx_ipoib/mt25218.c Целия файл

@@ -174,8 +174,8 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
174 174
 		size_t dump_len = in_len;
175 175
 		if ( dump_len > 256 )
176 176
 			dump_len = 256;
177
-		DBG ( "Input:\n" );
178
-		DBG_HD ( in, dump_len );
177
+		//		DBG ( "Input:\n" );
178
+		//		DBG_HD ( in, dump_len );
179 179
 	}
180 180
 
181 181
 	/* Issue command */
@@ -212,8 +212,8 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
212 212
 		size_t dump_len = out_len;
213 213
 		if ( dump_len > 256 )
214 214
 			dump_len = 256;
215
-		DBG ( "Output:\n" );
216
-		DBG_HD ( out, dump_len );
215
+		//		DBG ( "Output:\n" );
216
+		//		DBG_HD ( out, dump_len );
217 217
 	}
218 218
 
219 219
 	return 0;
@@ -749,7 +749,7 @@ static void arbel_ring_doorbell ( struct arbel *arbel,
749 749
 
750 750
 /** GID used for GID-less send work queue entries */
751 751
 static const struct ib_gid arbel_no_gid = {
752
-	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 }
752
+	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0 }
753 753
 };
754 754
 
755 755
 /**
@@ -805,6 +805,14 @@ static int arbel_post_send ( struct ib_device *ibdev,
805 805
 	MLX_FILL_1 ( &wqe->ud, 3, ud_address_vector.sl, av->sl );
806 806
 	gid = ( av->gid_present ? &av->gid : &arbel_no_gid );
807 807
 	memcpy ( &wqe->ud.u.dwords[4], gid, sizeof ( *gid ) );
808
+	
809
+	if ( ! av->gid_present ) {
810
+		DBG ( "no_gid:\n" );
811
+		DBG_HD ( &arbel_no_gid, sizeof ( arbel_no_gid ) );
812
+		DBG ( "gid:\n" );
813
+		DBG_HD ( &wqe->ud.u.dwords[4], 16 );
814
+	}
815
+	
808 816
 	MLX_FILL_1 ( &wqe->ud, 8, destination_qp, av->dest_qp );
809 817
 	MLX_FILL_1 ( &wqe->ud, 9, q_key, av->qkey );
810 818
 	MLX_FILL_1 ( &wqe->data[0], 0, byte_count, iob_len ( iobuf ) );
@@ -821,6 +829,11 @@ static int arbel_post_send ( struct ib_device *ibdev,
821 829
 		     f, 1,
822 830
 		     always1, 1 );
823 831
 
832
+
833
+	DBG ( "arbel_post_send()\n" );
834
+	DBG_HD ( wqe, sizeof ( *wqe ) );
835
+
836
+
824 837
 	/* Update doorbell record */
825 838
 	barrier();
826 839
 	qp_db_rec = &arbel->db_rec[arbel_send_wq->doorbell_idx].qp;
@@ -1248,6 +1261,17 @@ static int arbel_get_port_gid ( struct arbel *arbel,
1248 1261
 	return 0;
1249 1262
 }
1250 1263
 
1264
+static int arbel_get_sm_lid ( struct arbel *arbel,
1265
+			      unsigned long *sm_lid ) {
1266
+	struct ib_mad_port_info port_info;
1267
+	int rc;
1268
+
1269
+	if ( ( rc = arbel_get_port_info ( arbel, &port_info ) ) != 0 )
1270
+		return rc;
1271
+	*sm_lid = ntohs ( port_info.mastersm_lid );
1272
+	return 0;
1273
+}
1274
+
1251 1275
 static int arbel_get_broadcast_gid ( struct arbel *arbel,
1252 1276
 				     struct ib_gid *broadcast_gid ) {
1253 1277
 	static const struct ib_gid ipv4_broadcast_gid = {
@@ -1323,6 +1347,13 @@ static int arbel_probe ( struct pci_device *pci,
1323 1347
 	arbel->limits.reserved_qps =
1324 1348
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_qps ) );
1325 1349
 
1350
+	/* Get subnet manager LID */
1351
+	if ( ( rc = arbel_get_sm_lid ( arbel, &ibdev->sm_lid ) ) != 0 ) {
1352
+		DBGC ( arbel, "Arbel %p could not determine subnet manager "
1353
+		       "LID: %s\n", arbel, strerror ( rc ) );
1354
+		goto err_get_sm_lid;
1355
+	}
1356
+
1326 1357
 	/* Get port GID */
1327 1358
 	if ( ( rc = arbel_get_port_gid ( arbel, &ibdev->port_gid ) ) != 0 ) {
1328 1359
 		DBGC ( arbel, "Arbel %p could not determine port GID: %s\n",
@@ -1362,6 +1393,7 @@ static int arbel_probe ( struct pci_device *pci,
1362 1393
  err_ipoib_probe:
1363 1394
  err_get_broadcast_gid:
1364 1395
  err_get_port_gid:
1396
+ err_get_sm_lid:
1365 1397
  err_query_dev_lim:
1366 1398
 	ib_driver_close ( 0 );
1367 1399
  err_ib_driver_init:

+ 62
- 1
src/include/gpxe/infiniband.h Целия файл

@@ -10,6 +10,12 @@
10 10
 #include <stdint.h>
11 11
 #include <gpxe/device.h>
12 12
 
13
+/** Subnet administrator QPN */
14
+#define IB_SA_QPN	1
15
+
16
+/** Subnet administrator queue key */
17
+#define IB_SA_QKEY	0x80010000UL
18
+
13 19
 /** An Infiniband Global Identifier */
14 20
 struct ib_gid {
15 21
 	uint8_t bytes[16];
@@ -250,7 +256,9 @@ struct ib_device {
250 256
 	/** Port GID */
251 257
 	struct ib_gid port_gid;
252 258
 	/** Broadcast GID */
253
-	struct ib_gid broadcast_gid;	
259
+	struct ib_gid broadcast_gid;
260
+	/** Subnet manager LID */
261
+	unsigned long sm_lid;
254 262
 	/** Underlying device */
255 263
 	struct device *dev;
256 264
 	/** Infiniband operations */
@@ -422,6 +430,31 @@ static inline void * ib_get_ownerdata ( struct ib_device *ibdev ) {
422 430
 #define IB_SMP_ATTR_LED_INFO			0x0031
423 431
 #define IB_SMP_ATTR_VENDOR_MASK			0xFF00
424 432
 
433
+#define IB_SA_ATTR_MC_MEMBER_REC		0x38
434
+#define IB_SA_ATTR_PATH_REC			0x35
435
+
436
+#define IB_SA_MCMEMBER_REC_MGID			(1<<0)
437
+#define IB_SA_MCMEMBER_REC_PORT_GID		(1<<1)
438
+#define IB_SA_MCMEMBER_REC_QKEY			(1<<2)
439
+#define IB_SA_MCMEMBER_REC_MLID			(1<<3)
440
+#define IB_SA_MCMEMBER_REC_MTU_SELECTOR		(1<<4)
441
+#define IB_SA_MCMEMBER_REC_MTU			(1<<5)
442
+#define IB_SA_MCMEMBER_REC_TRAFFIC_CLASS	(1<<6)
443
+#define IB_SA_MCMEMBER_REC_PKEY			(1<<7)
444
+#define IB_SA_MCMEMBER_REC_RATE_SELECTOR	(1<<8)
445
+#define IB_SA_MCMEMBER_REC_RATE			(1<<9)
446
+#define IB_SA_MCMEMBER_REC_PACKET_LIFE_TIME_SELECTOR	(1<<10)
447
+#define IB_SA_MCMEMBER_REC_PACKET_LIFE_TIME	(1<<11)
448
+#define IB_SA_MCMEMBER_REC_SL			(1<<12)
449
+#define IB_SA_MCMEMBER_REC_FLOW_LABEL		(1<<13)
450
+#define IB_SA_MCMEMBER_REC_HOP_LIMIT		(1<<14)
451
+#define IB_SA_MCMEMBER_REC_SCOPE		(1<<15)
452
+#define IB_SA_MCMEMBER_REC_JOIN_STATE		(1<<16)
453
+#define IB_SA_MCMEMBER_REC_PROXY_JOIN		(1<<17)
454
+
455
+#define IB_SA_PATH_REC_DGID			(1<<2)
456
+#define IB_SA_PATH_REC_SGID			(1<<3)
457
+
425 458
 struct ib_mad_hdr {
426 459
 	uint8_t base_version;
427 460
 	uint8_t mgmt_class;
@@ -435,6 +468,17 @@ struct ib_mad_hdr {
435 468
 	uint32_t attr_mod;
436 469
 } __attribute__ (( packed ));
437 470
 
471
+struct ib_sa_hdr {
472
+	uint32_t sm_key[2];
473
+	uint16_t reserved;
474
+	uint16_t attrib_offset;
475
+	uint32_t comp_mask[2];
476
+} __attribute__ (( packed ));
477
+
478
+struct ib_rmpp_hdr {
479
+	uint32_t raw[3];
480
+} __attribute__ (( packed ));
481
+
438 482
 struct ib_mad_data {
439 483
 	struct ib_mad_hdr mad_hdr;
440 484
 	uint8_t data[232];
@@ -475,12 +519,29 @@ struct ib_mad_pkey_table {
475 519
 	uint16_t pkey[16][2];
476 520
 } __attribute__ (( packed ));
477 521
 
522
+struct ib_mad_path_record {
523
+	struct ib_mad_hdr mad_hdr;
524
+	struct ib_rmpp_hdr rmpp_hdr;
525
+	struct ib_sa_hdr sa_hdr;
526
+	uint32_t reserved0[2];
527
+	struct ib_gid dgid;
528
+	struct ib_gid sgid;
529
+	uint16_t dlid;
530
+	uint16_t slid;
531
+	uint32_t hop_limit__flow_label__raw_traffic;
532
+	uint32_t pkey__numb_path__reversible__tclass;
533
+	uint32_t rate__rate_selector__mtu__mtu_selector__sl__reserved;
534
+	uint32_t preference__packet_lifetime__packet_lifetime_selector;
535
+	uint32_t reserved1[35];
536
+} __attribute__ (( packed ));
537
+
478 538
 union ib_mad {
479 539
 	struct ib_mad_hdr mad_hdr;
480 540
 	struct ib_mad_data data;
481 541
 	struct ib_mad_guid_info guid_info;
482 542
 	struct ib_mad_port_info port_info;
483 543
 	struct ib_mad_pkey_table pkey_table;
544
+	struct ib_mad_path_record path_record;
484 545
 } __attribute__ (( packed ));
485 546
 
486 547
 #endif /* _GPXE_INFINIBAND_H */

Loading…
Отказ
Запис