summaryrefslogtreecommitdiff
path: root/include/linux/mlx5/qp.h
diff options
context:
space:
mode:
authorAharon Landau <aharonl@nvidia.com>2021-06-16 10:57:38 +0300
committerLeon Romanovsky <leonro@nvidia.com>2021-06-22 09:35:16 +0300
commit9a1ac95a59d0724ffac2181a98b232c3f94f49f5 (patch)
tree58b30e71cd768e5d856a0948df210c085e613eb1 /include/linux/mlx5/qp.h
parent009c9aa5be652675a06d5211e1640e02bbb1c33d (diff)
RDMA/mlx5: Refactor get_ts_format functions to simplify code
QPC, SQC and RQC timestamp formats and capabilities are always equal because they represent general hardware support. So instead of code duplication, let's merge them into general enum and logic. Signed-off-by: Aharon Landau <aharonl@nvidia.com> Reviewed-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'include/linux/mlx5/qp.h')
-rw-r--r--include/linux/mlx5/qp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index b7deb790f257..61e48d459b23 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -550,8 +550,8 @@ static inline const char *mlx5_qp_state_str(int state)
static inline int mlx5_get_qp_default_ts(struct mlx5_core_dev *dev)
{
return !MLX5_CAP_ROCE(dev, qp_ts_format) ?
- MLX5_QPC_TIMESTAMP_FORMAT_FREE_RUNNING :
- MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT;
+ MLX5_TIMESTAMP_FORMAT_FREE_RUNNING :
+ MLX5_TIMESTAMP_FORMAT_DEFAULT;
}
#endif /* MLX5_QP_H */