aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLeon Romanovsky <[email protected]>2024-06-16 18:35:47 +0300
committerLeon Romanovsky <[email protected]>2024-06-16 18:35:47 +0300
commitae6f6dd5fd0f77368ba5888c2c57bd23abfe4f35 (patch)
treeac4abede6e70a424db5a50caeedd04983f58ef08 /include/linux
parentef5513526bb6a83d7777acf5b79f71d19865563c (diff)
parentd98995b4bf981519dde4af0a081c393d62474039 (diff)
Delay mlx5_ib internal resources allocations
From: Leon Romanovsky <[email protected]> Internal mlx5_ib resources are created during mlx5_ib module load. This behavior is not optimal because it consumes resources that are not needed when SFs are created. This patch series delays the creation of mlx5_ib internal resources to the stage when they actually used. Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'include/linux')
-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 779cfdf2e9d6..0d31f77396fc 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -766,6 +766,12 @@ struct mlx5_hca_cap {
u32 max[MLX5_UN_SZ_DW(hca_cap_union)];
};
+enum mlx5_wc_state {
+ MLX5_WC_STATE_UNINITIALIZED,
+ MLX5_WC_STATE_UNSUPPORTED,
+ MLX5_WC_STATE_SUPPORTED,
+};
+
struct mlx5_core_dev {
struct device *device;
enum mlx5_coredev_type coredev_type;
@@ -824,6 +830,9 @@ struct mlx5_core_dev {
#endif
u64 num_ipsec_offloads;
struct mlx5_sd *sd;
+ enum mlx5_wc_state wc_state;
+ /* sync write combining state */
+ struct mutex wc_state_lock;
};
struct mlx5_db {
@@ -1375,4 +1384,6 @@ static inline bool mlx5_is_macsec_roce_supported(struct mlx5_core_dev *mdev)
enum {
MLX5_OCTWORD = 16,
};
+
+bool mlx5_wc_support_get(struct mlx5_core_dev *mdev);
#endif /* MLX5_DRIVER_H */