summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/main.c
diff options
context:
space:
mode:
authorYonatan Cohen <yonatanc@mellanox.com>2018-05-27 13:42:34 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-05-29 15:18:38 -0600
commit6f1006a43869ff82745eea3b88204d0a3bcc0158 (patch)
tree689c89ad93e857eedac390d833bc5e2b2b466bad /drivers/infiniband/hw/mlx5/main.c
parent572f46bf947c3eeca8d16518e0fb70f9250b4416 (diff)
downloadop-kernel-dev-6f1006a43869ff82745eea3b88204d0a3bcc0158.zip
op-kernel-dev-6f1006a43869ff82745eea3b88204d0a3bcc0158.tar.gz
IB/mlx5: Introduce a new mini-CQE format
The new mini-CQE format includes the stride index, byte count and packet checksum. Stride index is needed for striding WQ feature. This patch exposes this capability and enables its setting via mlx5 UHW data as part of query device and cq creation. Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Reviewed-by: Guy Levi <guyle@mellanox.com> Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 029c310..e0894b2 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -993,6 +993,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
resp.cqe_comp_caps.supported_format =
MLX5_IB_CQE_RES_FORMAT_HASH |
MLX5_IB_CQE_RES_FORMAT_CSUM;
+
+ if (MLX5_CAP_GEN(dev->mdev, mini_cqe_resp_stride_index))
+ resp.cqe_comp_caps.supported_format |=
+ MLX5_IB_CQE_RES_FORMAT_CSUM_STRIDX;
}
}
OpenPOWER on IntegriCloud