Message ID | 20190701165641.GA14149@jerryopenix (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2] RDMA/i40iw: Return the QP state when being queried | expand |
On Tue, Jul 02, 2019 at 12:56:41AM +0800, Liu, Changcheng wrote: > i40iw_query_qp does not return current QP state when QP attributes are > queried. > Return qp_state and cur_qp_state correctly in the QP attributes struct. > > Fixes: d37498417947 ("i40iw: add files for iwarp interface") > Signed-off-by: Changcheng Liu <changcheng.liu@intel.com> > Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com> > --- > v1 -> v2: > * Correct patch format with '---' under Signed-off-by. > * Refine commit message with 1) why need the change 2) solution. > * Add "Fixes" to show the original patch introduced the problem. > * Change patch title. > --- > drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 ++ > 1 file changed, 2 insertions(+) > Thanks, a lot. Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index 5689d742bafb..4c88d6f72574 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -772,6 +772,8 @@ static int i40iw_query_qp(struct ib_qp *ibqp, struct i40iw_qp *iwqp = to_iwqp(ibqp); struct i40iw_sc_qp *qp = &iwqp->sc_qp; + attr->qp_state = iwqp->ibqp_state; + attr->cur_qp_state = attr->qp_state; attr->qp_access_flags = 0; attr->cap.max_send_wr = qp->qp_uk.sq_size; attr->cap.max_recv_wr = qp->qp_uk.rq_size;