diff mbox

[10/11] RDMA/cxgb4: Insert hwtid in pass_accept_req instead in pass_establish

Message ID 1357564320-15022-11-git-send-email-vipul@chelsio.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Vipul Pandya Jan. 7, 2013, 1:11 p.m. UTC
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.

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
---
 drivers/infiniband/hw/cxgb4/cm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 06c3a52..37ea2fc 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2010,6 +2010,7 @@  static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
 
 	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;
@@ -2035,7 +2036,6 @@  static int pass_establish(struct c4iw_dev *dev, struct sk_buff *skb)
 	     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);