RDMA/mlx5: Return all configured create flags through query QP
The "flags" field in struct mlx5_ib_qp contains all UAPI flags configured at the create QP stage. Return all the data as is without masking. Link: https://lore.kernel.org/r/20200427154636.381474-18-leon@kernel.org Reviewed-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
90ecb37a75
commit
a8f3ea61e1
|
@ -443,6 +443,7 @@ struct mlx5_ib_qp {
|
|||
/* serialize qp state modifications
|
||||
*/
|
||||
struct mutex mutex;
|
||||
/* cached variant of create_flags from struct ib_qp_init_attr */
|
||||
u32 flags;
|
||||
u8 port;
|
||||
u8 state;
|
||||
|
|
|
@ -5878,18 +5878,7 @@ int mlx5_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
|
|||
|
||||
qp_init_attr->cap = qp_attr->cap;
|
||||
|
||||
qp_init_attr->create_flags = 0;
|
||||
if (qp->flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK)
|
||||
qp_init_attr->create_flags |= IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK;
|
||||
|
||||
if (qp->flags & IB_QP_CREATE_CROSS_CHANNEL)
|
||||
qp_init_attr->create_flags |= IB_QP_CREATE_CROSS_CHANNEL;
|
||||
if (qp->flags & IB_QP_CREATE_MANAGED_SEND)
|
||||
qp_init_attr->create_flags |= IB_QP_CREATE_MANAGED_SEND;
|
||||
if (qp->flags & IB_QP_CREATE_MANAGED_RECV)
|
||||
qp_init_attr->create_flags |= IB_QP_CREATE_MANAGED_RECV;
|
||||
if (qp->flags & MLX5_IB_QP_CREATE_SQPN_QP1)
|
||||
qp_init_attr->create_flags |= MLX5_IB_QP_CREATE_SQPN_QP1;
|
||||
qp_init_attr->create_flags = qp->flags;
|
||||
|
||||
qp_init_attr->sq_sig_type = qp->sq_signal_bits & MLX5_WQE_CTRL_CQ_UPDATE ?
|
||||
IB_SIGNAL_ALL_WR : IB_SIGNAL_REQ_WR;
|
||||
|
|
Loading…
Reference in New Issue