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