aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mlx5
diff options
context:
space:
mode:
authorMichael Guralnik <michaelgur@mellanox.com>2019-11-08 23:45:24 +0000
committerSaeed Mahameed <saeedm@mellanox.com>2019-11-11 12:15:29 -0800
commitcc9defcbb8fae52810f7795b039223edae51ef95 (patch)
tree4ee11cf42b8e8b8fdbd03414c93a2a74e5a587dd /include/linux/mlx5
parentnet/mlx5: Document flow_steering_mode devlink param (diff)
downloadwireguard-linux-cc9defcbb8fae52810f7795b039223edae51ef95.tar.xz
wireguard-linux-cc9defcbb8fae52810f7795b039223edae51ef95.zip
net/mlx5: Handle "enable_roce" devlink param
Register "enable_roce" param, default value is RoCE enabled. Current configuration is stored on mlx5_core_dev and exposed to user through the cmode runtime devlink param. Changing configuration requires changing the cmode driverinit devlink param and calling devlink reload. Signed-off-by: Michael Guralnik <michaelgur@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r--include/linux/mlx5/driver.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 7b4801e96feb..1884513aac90 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1191,4 +1191,15 @@ enum {
MLX5_TRIGGERED_CMD_COMP = (u64)1 << 32,
};
+static inline bool mlx5_is_roce_enabled(struct mlx5_core_dev *dev)
+{
+ struct devlink *devlink = priv_to_devlink(dev);
+ union devlink_param_value val;
+
+ devlink_param_driverinit_value_get(devlink,
+ DEVLINK_PARAM_GENERIC_ID_ENABLE_ROCE,
+ &val);
+ return val.vbool;
+}
+
#endif /* MLX5_DRIVER_H */