aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4.h
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcela@dev.mellanox.co.il>2011-12-12 23:16:56 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-13 13:56:07 -0500
commit2b8fb2867ca2736a715a88067fd0ec2904777cbe (patch)
tree507a7645aaeda05151045157756e1a828e60fe11 /drivers/net/ethernet/mellanox/mlx4/mlx4.h
parent5b4c4d36860ef1c411d0669ffc15090417a33389 (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 'drivers/net/ethernet/mellanox/mlx4/mlx4.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index abf65d8af48d..879f825c6f6a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -191,6 +191,7 @@ do { \
191 dev_warn(&mdev->pdev->dev, format, ##arg) 191 dev_warn(&mdev->pdev->dev, format, ##arg)
192 192
193extern int mlx4_log_num_mgm_entry_size; 193extern int mlx4_log_num_mgm_entry_size;
194extern int log_mtts_per_seg;
194 195
195#define MLX4_MAX_NUM_SLAVES (MLX4_MAX_NUM_PF + MLX4_MAX_NUM_VF) 196#define MLX4_MAX_NUM_SLAVES (MLX4_MAX_NUM_PF + MLX4_MAX_NUM_VF)
196#define ALL_SLAVES 0xff 197#define ALL_SLAVES 0xff
@@ -240,7 +241,7 @@ struct mlx4_mpt_entry {
240 __be32 win_cnt; 241 __be32 win_cnt;
241 u8 reserved1[3]; 242 u8 reserved1[3];
242 u8 mtt_rep; 243 u8 mtt_rep;
243 __be64 mtt_seg; 244 __be64 mtt_addr;
244 __be32 mtt_sz; 245 __be32 mtt_sz;
245 __be32 entity_size; 246 __be32 entity_size;
246 __be32 first_byte_offset; 247 __be32 first_byte_offset;