diff options
author | Amir Vadai <amirv@mellanox.com> | 2014-07-22 15:44:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-22 19:53:14 -0700 |
commit | ea1c1af1396cac9f8a1160acdac17f80e4b4f2c4 (patch) | |
tree | f68f7322365a1af4acc7354672466edd76e627e2 /drivers/net/ethernet/mellanox/mlx4/en_rx.c | |
parent | 2599d8580f93f0794d2fa850501b1068ce1d0aa8 (diff) | |
download | op-kernel-dev-ea1c1af1396cac9f8a1160acdac17f80e4b4f2c4.zip op-kernel-dev-ea1c1af1396cac9f8a1160acdac17f80e4b4f2c4.tar.gz |
net/mlx4_en: Reduce memory consumption on kdump kernel
When memory is limited, reduce number of rx and tx rings.
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_rx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 7765a08..9c909d2 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -335,8 +335,9 @@ void mlx4_en_set_num_rx_rings(struct mlx4_en_dev *mdev) dev->caps.comp_pool/ dev->caps.num_ports) - 1; - num_rx_rings = min_t(int, num_of_eqs, - netif_get_num_default_rss_queues()); + num_rx_rings = mlx4_low_memory_profile() ? MIN_RX_RINGS : + min_t(int, num_of_eqs, + netif_get_num_default_rss_queues()); mdev->profile.prof[i].rx_ring_num = rounddown_pow_of_two(num_rx_rings); } |