Re: [PATCH] RDMA/i40iw: set queue pair state when being queried

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 28, 2019 at 02:16:13PM +0800, Liu, Changcheng wrote:
> 1. queue pair state should be clear when querying RDMA/i40iw state.
> attr is allocated from kmalloc with unclear value. resp.qp_state
> isn't clear if attr->qp_state isn't set.
> 2. attr->qp_state should be set to be iwqp->ibqp_state.
> 3. attr->cur_qp_state should be set to be attr->qp_state when querying
> queue pair state.
>
> Signed-off-by: Changcheng Liu <changcheng.liu@xxxxxxxxxx>

1. It is wrong patch format, there is lack of "---" after your Signed-off-by.
2. You should describe why you need this change and not what is done in
the change.
3. I suppose, there is a need to add Fixes line.

Thanks

>
> 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;
> --
> 2.17.1
>



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux