提交 5dab6d3a 编写于 作者: H Hariprasad S 提交者: Roland Dreier

RDMA/cxgb4: Clean up connection on ARP error

Based on origninal work by Steve Wise <swise@opengridcomputing.com>
Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 233b4301
...@@ -432,8 +432,17 @@ static void arp_failure_discard(void *handle, struct sk_buff *skb) ...@@ -432,8 +432,17 @@ static void arp_failure_discard(void *handle, struct sk_buff *skb)
*/ */
static void act_open_req_arp_failure(void *handle, struct sk_buff *skb) static void act_open_req_arp_failure(void *handle, struct sk_buff *skb)
{ {
struct c4iw_ep *ep = handle;
printk(KERN_ERR MOD "ARP failure duing connect\n"); printk(KERN_ERR MOD "ARP failure duing connect\n");
kfree_skb(skb); kfree_skb(skb);
connect_reply_upcall(ep, -EHOSTUNREACH);
state_set(&ep->com, DEAD);
remove_handle(ep->com.dev, &ep->com.dev->atid_idr, ep->atid);
cxgb4_free_atid(ep->com.dev->rdev.lldi.tids, ep->atid);
dst_release(ep->dst);
cxgb4_l2t_release(ep->l2t);
c4iw_put_ep(&ep->com);
} }
/* /*
...@@ -658,7 +667,7 @@ static int send_connect(struct c4iw_ep *ep) ...@@ -658,7 +667,7 @@ static int send_connect(struct c4iw_ep *ep)
opt2 |= T5_OPT_2_VALID; opt2 |= T5_OPT_2_VALID;
opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE); opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE);
} }
t4_set_arp_err_handler(skb, NULL, act_open_req_arp_failure); t4_set_arp_err_handler(skb, ep, act_open_req_arp_failure);
if (is_t4(ep->com.dev->rdev.lldi.adapter_type)) { if (is_t4(ep->com.dev->rdev.lldi.adapter_type)) {
if (ep->com.remote_addr.ss_family == AF_INET) { if (ep->com.remote_addr.ss_family == AF_INET) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册