diff options
author | Maor Gottlieb <maorg@nvidia.com> | 2021-03-03 14:36:16 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-03-10 11:01:56 -0800 |
commit | 4806f1e2fee84c053cb68cd5be5817170bf0aab6 (patch) | |
tree | ffc9d0a1ec5b4685df778000ff51d96c9574d966 /include | |
parent | 469549e4778a1e5ac4a7c6659c4b1a75a648bfdf (diff) |
net/mlx5: Set QP timestamp mode to default
QPs which don't care from timestamp mode, should set the ts_format
to default, otherwise the QP creation could be failed if the timestamp
mode is not supported.
Fixes: 2fe8d4b87802 ("RDMA/mlx5: Fail QP creation if the device can not support the CQE TS")
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx5/qp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h index d75ef8aa8fac..b7deb790f257 100644 --- a/include/linux/mlx5/qp.h +++ b/include/linux/mlx5/qp.h @@ -547,4 +547,11 @@ 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; +} + #endif /* MLX5_QP_H */ |