Re: [PATCH 12/31] rdma/siw: add some debugging of state and sk_state to the teardown process

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

 



-----"Stefan Metzmacher" <metze@xxxxxxxxx> wrote: -----

>To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>
>From: "Stefan Metzmacher" <metze@xxxxxxxxx>
>Date: 05/07/2021 01:38AM
>Cc: linux-rdma@xxxxxxxxxxxxxxx, "Stefan Metzmacher" <metze@xxxxxxxxx>
>Subject: [EXTERNAL] [PATCH 12/31] rdma/siw: add some debugging of
>state and sk_state to the teardown process
>
>That makes it easier to understanf where possible problems come from.
>
>Fixes: 6c52fdc244b5 ("rdma/siw: connection management")
>Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx>
>Cc: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
>Cc: linux-rdma@xxxxxxxxxxxxxxx
>---
> drivers/infiniband/sw/siw/siw_cm.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_cm.c
>b/drivers/infiniband/sw/siw/siw_cm.c
>index 3cc1d22fe232..ed33533ff9e6 100644
>--- a/drivers/infiniband/sw/siw/siw_cm.c
>+++ b/drivers/infiniband/sw/siw/siw_cm.c
>@@ -111,6 +111,14 @@ static void __siw_cep_terminate_upcall(struct
>siw_cep *cep,
> 				       int reply_status)
> {
> 	bool suspended = false;
>+	int sk_state_val = UINT_MAX;
>+
>+	if (cep->sock && cep->sock->sk)
>+		sk_state_val = cep->sock->sk->sk_state;
>+

Please put this 'sk_state_val' logic into the single debug
statement, if we need that information at all.

>+	siw_dbg_cep(cep, "[QP %u]: state: %d sk_state: %d\n",
>+		    cep->qp ? qp_id(cep->qp) : UINT_MAX,
>+		    cep->state, sk_state_val);
> 
> 	if (cep->qp) {
> 		struct siw_qp *qp = cep->qp;
>@@ -118,9 +126,14 @@ static void __siw_cep_terminate_upcall(struct
>siw_cep *cep,
> 		if (qp->term_info.valid)
> 			siw_send_terminate(qp);
> 
>+		siw_dbg_cep(cep,
>+			    "with qp rx_suspend=%d tx_suspend=%d\n",
>+			    qp->rx_stream.rx_suspend,
>+			    qp->tx_ctx.tx_suspend);
> 		if (qp->rx_stream.rx_suspend || qp->tx_ctx.tx_suspend)
> 			suspended = true;
> 	} else {
>+		siw_dbg_cep(cep, "without qp\n");
> 		suspended = true;
> 	}
> 
>@@ -1307,7 +1320,7 @@ static void siw_cm_llp_state_change(struct sock
>*sk)
> 	}
> 	orig_state_change = cep->sk_state_change;
> 
>-	siw_dbg_cep(cep, "state: %d\n", cep->state);
>+	siw_dbg_cep(cep, "state: %d sk_state: %d\n", cep->state,
>sk->sk_state);
> 
> 	switch (sk->sk_state) {
> 	case TCP_ESTABLISHED:
>-- 
>2.25.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