Browse Source

ICM allocation code *should* now be complete.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
f20cd6f721
2 changed files with 54 additions and 10 deletions
  1. 27
    5
      src/drivers/net/mlx_ipoib/arbel.h
  2. 27
    5
      src/drivers/net/mlx_ipoib/mt25218.c

+ 27
- 5
src/drivers/net/mlx_ipoib/arbel.h View File

160
 struct arbel_dev_limits {
160
 struct arbel_dev_limits {
161
 	/** Number of reserved QPs */
161
 	/** Number of reserved QPs */
162
 	unsigned int reserved_qps;
162
 	unsigned int reserved_qps;
163
+	/** QP context entry size */
164
+	size_t qpc_entry_size;
165
+	/** Extended QP context entry size */
166
+	size_t eqpc_entry_size;
167
+	/** Number of reserved SRQs */
168
+	unsigned int reserved_srqs;
169
+	/** SRQ context entry size */
170
+	size_t srqc_entry_size;
163
 	/** Number of reserved EEs */
171
 	/** Number of reserved EEs */
164
 	unsigned int reserved_ees;
172
 	unsigned int reserved_ees;
165
-	/** Number of reserved MTTs */
166
-	unsigned int reserved_mtts;
173
+	/** EE context entry size */
174
+	size_t eec_entry_size;
175
+	/** Extended EE context entry size */
176
+	size_t eeec_entry_size;
167
 	/** Number of reserved CQs */
177
 	/** Number of reserved CQs */
168
 	unsigned int reserved_cqs;
178
 	unsigned int reserved_cqs;
169
-	/** Number of reserved SRQs */
170
-	unsigned int reserved_srqs;
171
-	/** Number of reserver UARs */
179
+	/** CQ context entry size */
180
+	size_t cqc_entry_size;
181
+	/** Number of reserved MTTs */
182
+	unsigned int reserved_mtts;
183
+	/** MTT entry size */
184
+	size_t mtt_entry_size;
185
+	/** Number of reserved MRWs */
186
+	unsigned int reserved_mrws;
187
+	/** MPT entry size */
188
+	size_t mpt_entry_size;
189
+	/** Number of reserved RDBs */
190
+	unsigned int reserved_rdbs;
191
+	/** EQ context entry size */
192
+	size_t eqc_entry_size;
193
+	/** Number of reserved UARs */
172
 	unsigned int reserved_uars;
194
 	unsigned int reserved_uars;
173
 };
195
 };
174
 
196
 

+ 27
- 5
src/drivers/net/mlx_ipoib/mt25218.c View File

1494
 
1494
 
1495
 	arbel->limits.reserved_qps =
1495
 	arbel->limits.reserved_qps =
1496
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_qps ) );
1496
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_qps ) );
1497
+	arbel->limits.qpc_entry_size = MLX_GET ( &dev_lim, qpc_entry_sz );
1498
+	arbel->limits.eqpc_entry_size = MLX_GET ( &dev_lim, eqpc_entry_sz );
1499
+	arbel->limits.reserved_srqs =
1500
+		( 1 << MLX_GET ( &dev_lim, log2_rsvd_srqs ) );
1501
+	arbel->limits.srqc_entry_size = MLX_GET ( &dev_lim, srq_entry_sz );
1497
 	arbel->limits.reserved_ees =
1502
 	arbel->limits.reserved_ees =
1498
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_ees ) );
1503
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_ees ) );
1499
-	arbel->limits.reserved_mtts =
1500
-		( 1 << MLX_GET ( &dev_lim, log2_rsvd_mtts ) );
1504
+	arbel->limits.eec_entry_size = MLX_GET ( &dev_lim, eec_entry_sz );
1505
+	arbel->limits.eeec_entry_size = MLX_GET ( &dev_lim, eeec_entry_sz );
1501
 	arbel->limits.reserved_cqs =
1506
 	arbel->limits.reserved_cqs =
1502
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_cqs ) );
1507
 		( 1 << MLX_GET ( &dev_lim, log2_rsvd_cqs ) );
1503
-	arbel->limits.reserved_srqs =
1504
-		( 1 << MLX_GET ( &dev_lim, log2_rsvd_srqs ) );
1508
+	arbel->limits.cqc_entry_size = MLX_GET ( &dev_lim, cqc_entry_sz );
1509
+	arbel->limits.reserved_mtts =
1510
+		( 1 << MLX_GET ( &dev_lim, log2_rsvd_mtts ) );
1511
+	arbel->limits.mtt_entry_size = MLX_GET ( &dev_lim, mtt_entry_sz );
1512
+	arbel->limits.reserved_mrws =
1513
+		( 1 << MLX_GET ( &dev_lim, log2_rsvd_mrws ) );
1514
+	arbel->limits.mpt_entry_size = MLX_GET ( &dev_lim, mpt_entry_sz );
1515
+	arbel->limits.reserved_rdbs =
1516
+		( 1 << MLX_GET ( &dev_lim, log2_rsvd_rdbs ) );
1517
+	arbel->limits.eqc_entry_size = MLX_GET ( &dev_lim, eqc_entry_sz );
1505
 	arbel->limits.reserved_uars = MLX_GET ( &dev_lim, num_rsvd_uars );
1518
 	arbel->limits.reserved_uars = MLX_GET ( &dev_lim, num_rsvd_uars );
1506
 
1519
 
1507
 	return 0;
1520
 	return 0;
1616
 	icm_offset += ( ( 1 << log_num_eqs ) * arbel->limits.eqc_entry_size );
1629
 	icm_offset += ( ( 1 << log_num_eqs ) * arbel->limits.eqc_entry_size );
1617
 
1630
 
1618
 	/* Multicast table */
1631
 	/* Multicast table */
1619
-
1632
+	MLX_FILL_1 ( &init_hca, 49,
1633
+		     multicast_parameters.mc_base_addr_l, icm_offset );
1634
+	MLX_FILL_1 ( &init_hca, 52,
1635
+		     multicast_parameters.log_mc_table_entry_sz,
1636
+		     fls ( sizeof ( struct arbelprm_mgm_entry ) - 1 ) );
1637
+	MLX_FILL_1 ( &init_hca, 53,
1638
+		     multicast_parameters.mc_table_hash_sz, 8 );
1639
+	MLX_FILL_1 ( &init_hca, 54,
1640
+		     multicast_parameters.log_mc_table_sz, 3 );
1641
+	icm_offset += ( 8 * sizeof ( struct arbelprm_mgm_entry ) );
1620
 
1642
 
1621
 	return 0;
1643
 	return 0;
1622
 }
1644
 }

Loading…
Cancel
Save