linux_dsm_epyc7002/drivers/infiniband/hw
Hariprasad S 093108cb36 RDMA/iw_cxgb4: Always wake up waiter in c4iw_peer_abort_intr()
Currently c4iw_peer_abort_intr() does not wake up the waiter if the
endpoint state indicates we're using MPAv2 and we're currently trying to
connect. This was introduced with commit 7c0a33d611 ("RDMA/cxgb4:
Don't wakeup threads for MPAv2")

However, this original fix is flawed because it introduces a race that
can cause a deadlock of the iwarp stack.  Here is the race:

->local side sets up an active offload connection.

->local side sends MPA_START request.

->peer sends MPA_START response.

->local side ingress cpl thread begins processing the MPA_START response,
but before it changes the state from MPA_REQ_SENT to FPDU_MODE:

->peer sends a RST which results in a ABORT_REQ_RSS.  This triggers
peer_abort_intr() which sees the state in MPA_REQ_SENT and since mpa_rev
is 2, it will avoid waking up the endpoint with -ECONNRESET, assuming the
stack will re-attempt the connection using MPAv1.

->Meanwhile, the cpl thread moves the state to FPDU_MODE and calls
c4iw_modify_rc_qp() which calls rdma_init() which sends a RI_WR/INIT WR
to firmware.  But since HW sent an abort, FW correctly drops the RI_WR/INIT
WR.

->So the cpl thread is stuck waiting for a reply and cannot process the
ABORT_REQ_RSS cpl sitting in its input queue. Thus everything comes to a
halt because no more ingress cpls are processed by the stack...

The correct fix for the issue is to always do the wake up in
c4iw_abort_intr() but reinitialize the wait object in c4iw_reconnect().

Fixes: 7c0a33d611 ("RDMA/cxgb4: Don't wakeup threads for MPAv2")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-05-13 19:38:10 -04:00
..
cxgb3 iw_cxgb3: initialize ibdev.iwcm->ifname for port mapping 2016-04-26 12:46:54 -04:00
cxgb4 RDMA/iw_cxgb4: Always wake up waiter in c4iw_peer_abort_intr() 2016-05-13 19:38:10 -04:00
i40iw RDMA/i40iw: Fix for removing quad hash entries 2016-04-28 16:32:55 -04:00
mlx4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-03-19 10:05:34 -07:00
mlx5 Merge branch 'k.o/for-4.6-rc' into testing/4.6 2016-04-28 15:16:32 -04:00
mthca mm/gup: Switch all callers of get_user_pages() to not pass tsk/mm 2016-02-16 10:11:12 +01:00
nes RDMA/nes: don't leak skb if carrier down 2016-04-28 21:11:09 -04:00
ocrdma IB/ocrdma: Skip using unneeded intermediate variable 2016-03-03 13:33:22 -05:00
qib IB/rdmavt,hfi1,qib: Fix memory leak 2016-04-28 16:32:27 -04:00
usnic Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
Makefile i40iw: changes for build of i40iw module 2016-03-16 13:50:54 -04:00