]> git.openfabrics.org - ~emulex/compat-rdma.git/commitdiff
RDMA/cxgb4: Insert hwtid in pass_accept_req instead in pass_establish
authorVipul Pandya <vipul@chelsio.com>
Tue, 11 Dec 2012 06:39:18 +0000 (22:39 -0800)
committerVipul Pandya <vipul@chelsio.com>
Tue, 11 Dec 2012 06:39:18 +0000 (22:39 -0800)
This patch fixes bug 2405 in OFED bugzilla.

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
linux-next-pending/0032-RDMA-cxgb4-Insert-hwtid-in-pass-accept-req.patch [new file with mode: 0644]

diff --git a/linux-next-pending/0032-RDMA-cxgb4-Insert-hwtid-in-pass-accept-req.patch b/linux-next-pending/0032-RDMA-cxgb4-Insert-hwtid-in-pass-accept-req.patch
new file mode 100644 (file)
index 0000000..dac269a
--- /dev/null
@@ -0,0 +1,26 @@
+RDMA/cxgb4: Insert hwtid in pass_accept_req instead in pass_establish
+
+CPL_ABORT_REQ_RSS can come before TCP connection is established. In such case
+peer_abort was trying to remove the hwtid which was not inserted. To avoid this
+we insert the hwtid when we are sure that we are surely going to send passive
+accept request. 
+
+diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
+--- a/drivers/infiniband/hw/cxgb4/cm.c    2012-12-10 18:06:39.057722023 +0530
++++ b/drivers/infiniband/hw/cxgb4/cm.c    2012-12-10 18:00:55.151704577 +0530
+@@ -2057,6 +2057,7 @@ static int pass_accept_req(struct c4iw_d
+       init_timer(&child_ep->timer);
+       cxgb4_insert_tid(t, child_ep, hwtid);
++      insert_handle(dev, &dev->hwtid_idr, child_ep, child_ep->hwtid);
+       accept_cr(child_ep, peer_ip, skb, req);
+       set_bit(PASS_ACCEPT_REQ, &child_ep->com.history);
+       goto out;
+@@ -2082,7 +2083,6 @@ static int pass_establish(struct c4iw_de
+            ntohs(req->tcp_opt));
+       set_emss(ep, ntohs(req->tcp_opt));
+-      insert_handle(dev, &dev->hwtid_idr, ep, ep->hwtid);
+       dst_confirm(ep->dst);
+       state_set(&ep->com, MPA_REQ_WAIT);