Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDMA/mlx5: Fix check for supported user flags when creating a QP

When the flags verification was added two flags were missed from the
check:
* MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC
* MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC

This causes user applications that were using these flags to break.

Fixes: 2e43bb31b8df ("IB/mlx5: Verify that driver supports user flags")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

authored by

Mark Bloch and committed by
Jason Gunthorpe
8af526e0 49a57857

+9 -7
+9 -7
drivers/infiniband/hw/mlx5/qp.c
··· 1912 1912 } 1913 1913 1914 1914 if (!check_flags_mask(ucmd.flags, 1915 + MLX5_QP_FLAG_ALLOW_SCATTER_CQE | 1916 + MLX5_QP_FLAG_BFREG_INDEX | 1917 + MLX5_QP_FLAG_PACKET_BASED_CREDIT_MODE | 1918 + MLX5_QP_FLAG_SCATTER_CQE | 1915 1919 MLX5_QP_FLAG_SIGNATURE | 1916 - MLX5_QP_FLAG_SCATTER_CQE | 1917 - MLX5_QP_FLAG_TUNNEL_OFFLOADS | 1918 - MLX5_QP_FLAG_BFREG_INDEX | 1919 - MLX5_QP_FLAG_TYPE_DCT | 1920 - MLX5_QP_FLAG_TYPE_DCI | 1921 - MLX5_QP_FLAG_ALLOW_SCATTER_CQE | 1922 - MLX5_QP_FLAG_PACKET_BASED_CREDIT_MODE)) 1920 + MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC | 1921 + MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC | 1922 + MLX5_QP_FLAG_TUNNEL_OFFLOADS | 1923 + MLX5_QP_FLAG_TYPE_DCI | 1924 + MLX5_QP_FLAG_TYPE_DCT)) 1923 1925 return -EINVAL; 1924 1926 1925 1927 err = get_qp_user_index(to_mucontext(pd->uobject->context),