Re: [PATCH v2] RDMA/rxe: Generate a completion on error after getting a wqe

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

 



On 2022/3/29 2:47, Leon Romanovsky wrote:
> I see that you put same wqe->status for all error paths.
> If we assume that same status needs to be for all errors, you will better
> put this line under err label.
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
> index 5eb89052dd66..003a9b109eff 100644
> --- a/drivers/infiniband/sw/rxe/rxe_req.c
> +++ b/drivers/infiniband/sw/rxe/rxe_req.c
> @@ -752,6 +752,7 @@ int rxe_requester(void *arg)
>          goto next_wqe;
>
>   err:
> +       wqe->status = IB_WC_LOC_QP_OP_ERR;
>          wqe->state = wqe_state_error;
>          __rxe_do_task(&qp->comp.task);
>
>
> BTW, I didn't review if same error status is applicable for all paths.

Hi Leon,

It's not suitable to set the same IB_WC_LOC_QP_OP_ERR for all paths 
because other error status also will be set in some places.

For example:

IB_WC_LOC_QP_OP_ERR or IB_WC_MW_BIND_ERR will be set in rxe_do_local_ops()

IB_WC_LOC_PROT_ERR or IB_WC_LOC_QP_OP_ERR will be set by checking the 
return value of finish_packet()


Hi Leon, Bob, Yanjun

How can I know if IB_WC_LOC_QP_OP_ERR is suitable for all changes on my 
patch?

In other words,  how can I know which error status should be used in 
which case?


Best Regards,

Xiao Yang

>
> Thanks




[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