diff options
author | Hariprasad S <hariprasad@chelsio.com> | 2014-06-23 09:42:36 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-07-08 19:56:54 -0400 |
commit | 5dab6d3ab1abed99be6166b844af58237d52a135 (patch) | |
tree | 051ced9492d92b989ef78f6580414763c95ed53f | |
parent | 233b43010330ed8cf39cf636880017df3e33f102 (diff) |
RDMA/cxgb4: Clean up connection on ARP error
Based on origninal work by Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index cc36e9bf9dea..6a93280250d1 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -432,8 +432,17 @@ static void arp_failure_discard(void *handle, struct sk_buff *skb) | |||
432 | */ | 432 | */ |
433 | static void act_open_req_arp_failure(void *handle, struct sk_buff *skb) | 433 | static void act_open_req_arp_failure(void *handle, struct sk_buff *skb) |
434 | { | 434 | { |
435 | struct c4iw_ep *ep = handle; | ||
436 | |||
435 | printk(KERN_ERR MOD "ARP failure duing connect\n"); | 437 | printk(KERN_ERR MOD "ARP failure duing connect\n"); |
436 | kfree_skb(skb); | 438 | kfree_skb(skb); |
439 | connect_reply_upcall(ep, -EHOSTUNREACH); | ||
440 | state_set(&ep->com, DEAD); | ||
441 | remove_handle(ep->com.dev, &ep->com.dev->atid_idr, ep->atid); | ||
442 | cxgb4_free_atid(ep->com.dev->rdev.lldi.tids, ep->atid); | ||
443 | dst_release(ep->dst); | ||
444 | cxgb4_l2t_release(ep->l2t); | ||
445 | c4iw_put_ep(&ep->com); | ||
437 | } | 446 | } |
438 | 447 | ||
439 | /* | 448 | /* |
@@ -658,7 +667,7 @@ static int send_connect(struct c4iw_ep *ep) | |||
658 | opt2 |= T5_OPT_2_VALID; | 667 | opt2 |= T5_OPT_2_VALID; |
659 | opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE); | 668 | opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE); |
660 | } | 669 | } |
661 | t4_set_arp_err_handler(skb, NULL, act_open_req_arp_failure); | 670 | t4_set_arp_err_handler(skb, ep, act_open_req_arp_failure); |
662 | 671 | ||
663 | if (is_t4(ep->com.dev->rdev.lldi.adapter_type)) { | 672 | if (is_t4(ep->com.dev->rdev.lldi.adapter_type)) { |
664 | if (ep->com.remote_addr.ss_family == AF_INET) { | 673 | if (ep->com.remote_addr.ss_family == AF_INET) { |