Skip to content

Commit 22e27c2

Browse files
Marcel Apfelbaumjfvogel
authored andcommitted
mlx4_core: Error message on mtt allocation failure
Add error message if mlx4_mtt_init fails to allocate mtts. Signed-off-by: Marcel Apfelbaum <[email protected]> Reviewed-by: Jack Morgenstein <[email protected]> Signed-off-by: Vladimir Sokolovsky <[email protected]> (Ported from Mellanox OFED 2.4) Signed-off-by: Mukesh Kacker <[email protected]> Orabug: 27510506 (cherry picked from commit bd2177d) cherry-pick-repo=linux-uek.git Signed-off-by: Qing Huang <[email protected]> Signed-off-by: Aron Silverton <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]> Orabug: 31620954 UEK5 => UEK6 (cherry picked from commit bcdd823) cherry-pick-repo=UEK/production/linux-uek.git unmodified-from-upstream: bcdd823 Signed-off-by: Qing Huang <[email protected]> Reviewed-by: Sharath Srinivasan <[email protected]> Signed-off-by: Aron Silverton <[email protected]> Orabug: 31620955 UEK6 => LUCI (cherry picked from commit cfe78a5) cherry-pick-repo=UEK/production/linux-uek.git unmodified-from-upstream: cfe78a5 Signed-off-by: Sharath Srinivasan <[email protected]> Reviewed-by: Sharon Liu <[email protected]> Signed-off-by: Aron Silverton <[email protected]
1 parent 92d276f commit 22e27c2

File tree

1 file changed

+6
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+6
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/mr.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,13 @@ int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
207207
++mtt->order;
208208

209209
mtt->offset = mlx4_alloc_mtt_range(dev, mtt->order);
210-
if (mtt->offset == -1)
210+
if (mtt->offset == -1) {
211+
#ifndef WITHOUT_ORACLE_EXTENSIONS
212+
mlx4_err(dev, "Failed to allocate mtts for %d pages(order %d)\n",
213+
npages, mtt->order);
214+
#endif /* !WITHOUT_ORACLE_EXTENSIONS */
211215
return -ENOMEM;
216+
}
212217

213218
return 0;
214219
}

0 commit comments

Comments
 (0)