On Wed, Apr 10, 2019 at 10:59:45AM +0300, Leon Romanovsky wrote: > From: Guy Levi <guyle@xxxxxxxxxxxx> > > The scatter to CQE over DCT QP actually has never been enabled since the > driver refers to device QP context layout instead of device DCT context > layout when it is configure the scatter to CQE relevant bits. It causes > a memory corruption. > Additionally, A new capability is exposed to user-space which lets it > to ensure that it will not enable the feature without this fix. > > Fixes: 5d6ff1babe ("IB/mlx5: Support scatter to CQE for DC transport type") > Signed-off-by: Guy Levi <guyle@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > --- > drivers/infiniband/hw/mlx5/main.c | 2 ++ > drivers/infiniband/hw/mlx5/qp.c | 11 +++++++---- > include/uapi/rdma/mlx5-abi.h | 1 + > 3 files changed, 10 insertions(+), 4 deletions(-) I rewrote the commit message and applied it to for-rc IB/mlx5: Fix scatter to CQE in DCT QP creation When scatter to CQE is enabled on a DCT QP it corrupts the mailbox command since it tried to treat it as as QP create mailbox command instead of a DCT create command. The corrupted mailbox command causes userspace to malfunction as the device doesn't create the QP as expected. A new mlx5 capability is exposed to user-space which ensures that it will not enable the feature on DCT without this fix in the kernel. Fixes: 5d6ff1babe ("IB/mlx5: Support scatter to CQE for DC transport type") Signed-off-by: Guy Levi <guyle@xxxxxxxxxxxx> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> Jason