diff options
author | Amir Vadai <amirv@mellanox.com> | 2014-07-22 15:44:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-22 19:53:14 -0700 |
commit | 2599d8580f93f0794d2fa850501b1068ce1d0aa8 (patch) | |
tree | eac3c2b7e7a642adc071df54c57b87f392f7654e /include/linux/mlx4/device.h | |
parent | 0fef9d0308d4c524da716b4b669d8754594450b2 (diff) | |
download | blackbird-obmc-linux-2599d8580f93f0794d2fa850501b1068ce1d0aa8.tar.gz blackbird-obmc-linux-2599d8580f93f0794d2fa850501b1068ce1d0aa8.zip |
net/mlx4_core: Use low memory profile on kdump kernel
When running in kdump kernel, reduce number of resources allocated for
the hardware. This will enable the NIC to operate in this low memory
environment at the expense of performance and some features not related
to the basic NIC functionality.
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4/device.h')
-rw-r--r-- | include/linux/mlx4/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index fa660aedb822..e15b1544ea83 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h @@ -1254,4 +1254,11 @@ int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port); int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, int enable); + +/* Returns true if running in low memory profile (kdump kernel) */ +static inline bool mlx4_low_memory_profile(void) +{ + return reset_devices; +} + #endif /* MLX4_DEVICE_H */ |