aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4/device.h
diff options
context:
space:
mode:
authorAmir Vadai <amirv@mellanox.com>2014-07-22 15:44:11 +0300
committerDavid S. Miller <davem@davemloft.net>2014-07-22 19:53:14 -0700
commit2599d8580f93f0794d2fa850501b1068ce1d0aa8 (patch)
treeeac3c2b7e7a642adc071df54c57b87f392f7654e /include/linux/mlx4/device.h
parentnet/mlx4_en: Disable blueflame using ethtool private flags (diff)
downloadlinux-dev-2599d8580f93f0794d2fa850501b1068ce1d0aa8.tar.xz
linux-dev-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 '')
-rw-r--r--include/linux/mlx4/device.h7
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 */