diff options
| author | Marcel Apfelbaum <marcela@dev.mellanox.co.il> | 2011-12-12 23:16:56 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-12-13 13:56:07 -0500 |
| commit | 2b8fb2867ca2736a715a88067fd0ec2904777cbe (patch) | |
| tree | 507a7645aaeda05151045157756e1a828e60fe11 /include/linux/mlx4 | |
| parent | 5b4c4d36860ef1c411d0669ffc15090417a33389 (diff) | |
mlx4_core: mtts resources units changed to offset
In the previous implementation mtts are managed by:
1. order - log(mtt segments), 'mtt segment' groups several mtts together.
2. first_seg - segment location relative to mtt table.
In the current implementation:
1. order - log(mtts) rather than segments
2. offset - mtt index in mtt table
Note: The actual mtt allocation is made in segments but it is
transparent to callers.
Rational: The mtt resource holders are not interested on how the allocation
of mtt is done, but rather on how they will use it.
Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
| -rw-r--r-- | include/linux/mlx4/device.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 3ef73b05e24..65bb466c575 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -272,8 +272,7 @@ struct mlx4_caps { | |||
| 272 | int num_comp_vectors; | 272 | int num_comp_vectors; |
| 273 | int comp_pool; | 273 | int comp_pool; |
| 274 | int num_mpts; | 274 | int num_mpts; |
| 275 | int num_mtt_segs; | 275 | int num_mtts; |
| 276 | int mtts_per_seg; | ||
| 277 | int fmr_reserved_mtts; | 276 | int fmr_reserved_mtts; |
| 278 | int reserved_mtts; | 277 | int reserved_mtts; |
| 279 | int reserved_mrws; | 278 | int reserved_mrws; |
| @@ -323,7 +322,7 @@ struct mlx4_buf { | |||
| 323 | }; | 322 | }; |
| 324 | 323 | ||
| 325 | struct mlx4_mtt { | 324 | struct mlx4_mtt { |
| 326 | u32 first_seg; | 325 | u32 offset; |
| 327 | int order; | 326 | int order; |
| 328 | int page_shift; | 327 | int page_shift; |
| 329 | }; | 328 | }; |
