diff options
author | Guy Levi <guyle@mellanox.com> | 2017-10-19 08:25:52 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-10-25 14:17:06 -0400 |
commit | de57f2ad06d5bf01015b955600cbfc77059b2b6e (patch) | |
tree | 5081dcbb21b15359bf836e5d21d93402c771fe57 /drivers/infiniband/hw/mlx5/cq.c | |
parent | 0ff8e79ca7c81fafa3f5c91a1b58efc85cbc2302 (diff) | |
download | op-kernel-dev-de57f2ad06d5bf01015b955600cbfc77059b2b6e.zip op-kernel-dev-de57f2ad06d5bf01015b955600cbfc77059b2b6e.tar.gz |
IB/mlx5: Support 128B CQE compression feature
In commit 1cbe6fc86ccf ("IB/mlx5: Add support for CQE compressing") the
concept of CQE compression was introduced and added a support for 64B
CQE size. This change update the code to support 128B CQE size as well.
Signed-off-by: Guy Levi <guyle@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/cq.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/cq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index b8a116d..51871f0 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c @@ -804,8 +804,10 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata, *index = to_mucontext(context)->bfregi.sys_pages[0]; if (ucmd.cqe_comp_en == 1) { - if (unlikely((*cqe_size != 64) || - !MLX5_CAP_GEN(dev->mdev, cqe_compression))) { + if (!((*cqe_size == 128 && + MLX5_CAP_GEN(dev->mdev, cqe_compression_128)) || + (*cqe_size == 64 && + MLX5_CAP_GEN(dev->mdev, cqe_compression)))) { err = -EOPNOTSUPP; mlx5_ib_warn(dev, "CQE compression is not supported for size %d!\n", *cqe_size); |