diff mbox series

[for-next,08/13] RDMA/ibtrs-clt: missing error from rtrs_rdma_conn_established

Message ID 20201012131814.121096-9-jinpu.wang@cloud.ionos.com (mailing list archive)
State Superseded
Headers show
Series rtrs: misc fix and cleanup | expand

Commit Message

Jinpu Wang Oct. 12, 2020, 1:18 p.m. UTC
From: Gioh Kim <gi-oh.kim@cloud.ionos.com>

When rtrs_rdma_conn_established returns error (non-zero value),
the error value is stored in con->cm_err and it cannot trigger
rtrs_rdma_error_recovery. Finally the error of rtrs_rdma_con_established
will be forgot.

Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
---
 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jinpu Wang Oct. 12, 2020, 1:23 p.m. UTC | #1
On Mon, Oct 12, 2020 at 3:18 PM Jack Wang <jinpu.wang@cloud.ionos.com> wrote:
>
> From: Gioh Kim <gi-oh.kim@cloud.ionos.com>
>
> When rtrs_rdma_conn_established returns error (non-zero value),
> the error value is stored in con->cm_err and it cannot trigger
> rtrs_rdma_error_recovery. Finally the error of rtrs_rdma_con_established
> will be forgot.
>
> Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
sorry, forgot to change the subject line to rtrs.
Jason, do you want a resend with the fixed subject.
> ---
>  drivers/infiniband/ulp/rtrs/rtrs-clt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> index 7764a01185ef..f63f239bbf55 100644
> --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
> @@ -1822,8 +1822,8 @@ static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id,
>                 cm_err = rtrs_rdma_route_resolved(con);
>                 break;
>         case RDMA_CM_EVENT_ESTABLISHED:
> -               con->cm_err = rtrs_rdma_conn_established(con, ev);
> -               if (likely(!con->cm_err)) {
> +               cm_err = rtrs_rdma_conn_established(con, ev);
> +               if (likely(!cm_err)) {
>                         /*
>                          * Report success and wake up. Here we abuse state_wq,
>                          * i.e. wake up without state change, but we set cm_err.
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 7764a01185ef..f63f239bbf55 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1822,8 +1822,8 @@  static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id,
 		cm_err = rtrs_rdma_route_resolved(con);
 		break;
 	case RDMA_CM_EVENT_ESTABLISHED:
-		con->cm_err = rtrs_rdma_conn_established(con, ev);
-		if (likely(!con->cm_err)) {
+		cm_err = rtrs_rdma_conn_established(con, ev);
+		if (likely(!cm_err)) {
 			/*
 			 * Report success and wake up. Here we abuse state_wq,
 			 * i.e. wake up without state change, but we set cm_err.