summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorDaniel Jurgens <danielj@mellanox.com>2018-11-21 10:12:05 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-22 14:38:36 -0500
commite45678973dcbb131f29a6c90b0ea3829f38eeab8 (patch)
tree7c832cf06e48233a27040f9134bd70b14d77debf /include/linux/mlx4
parent1d0795ea9ca37be0fa0823776e0367b8fc398c91 (diff)
{net, IB}/mlx4: Initialize CQ buffers in the driver when possible
Perform CQ initialization in the driver when the capability is supported by the FW. When passing the CQ to HW indicate that the CQ buffer has been pre-initialized. Doing so decreases CQ creation time. Testing on P8 showed a single 2048 entry CQ creation time was reduced from ~395us to ~170us, which is 2.3x faster. Signed-off-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index dca6ab4eaa99..36e412c3d657 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -226,6 +226,7 @@ enum {
226 MLX4_DEV_CAP_FLAG2_SL_TO_VL_CHANGE_EVENT = 1ULL << 37, 226 MLX4_DEV_CAP_FLAG2_SL_TO_VL_CHANGE_EVENT = 1ULL << 37,
227 MLX4_DEV_CAP_FLAG2_USER_MAC_EN = 1ULL << 38, 227 MLX4_DEV_CAP_FLAG2_USER_MAC_EN = 1ULL << 38,
228 MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1ULL << 39, 228 MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1ULL << 39,
229 MLX4_DEV_CAP_FLAG2_SW_CQ_INIT = 1ULL << 40,
229}; 230};
230 231
231enum { 232enum {
@@ -1136,7 +1137,8 @@ void mlx4_free_hwq_res(struct mlx4_dev *mdev, struct mlx4_hwq_resources *wqres,
1136 1137
1137int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, 1138int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
1138 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq, 1139 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq,
1139 unsigned vector, int collapsed, int timestamp_en); 1140 unsigned int vector, int collapsed, int timestamp_en,
1141 void *buf_addr, bool user_cq);
1140void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); 1142void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq);
1141int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, 1143int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align,
1142 int *base, u8 flags, u8 usage); 1144 int *base, u8 flags, u8 usage);