aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4
diff options
context:
space:
mode:
authorHariprasad S <hariprasad@chelsio.com>2016-05-06 22:18:10 +0530
committerDoug Ledford <dledford@redhat.com>2016-05-13 19:38:11 -0400
commit64bec74a9b3ccc0e9795161427ea49864462f612 (patch)
treeed9d4d1df3bc47bad1f54f891bb64f7e34093f69 /drivers/infiniband/hw/cxgb4
parentRDMA/iw_cxgb4: Always wake up waiter in c4iw_peer_abort_intr() (diff)
downloadlinux-dev-64bec74a9b3ccc0e9795161427ea49864462f612.tar.xz
linux-dev-64bec74a9b3ccc0e9795161427ea49864462f612.zip
RDMA/iw_cxgb4: Add arp failure handlers to send_mpa_reply/reject()
These handlers when called print error message to the kernel log, but the actual handling is done by _c4iw_free_ep() and process_timeout(). Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 4f8afa2b8e21..c4b7f1f8f8a5 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -515,6 +515,11 @@ static void arp_failure_discard(void *handle, struct sk_buff *skb)
kfree_skb(skb);
}
+static void mpa_start_arp_failure(void *handle, struct sk_buff *skb)
+{
+ pr_err("ARP failure during MPA Negotiation - Closing Connection\n");
+}
+
enum {
NUM_FAKE_CPLS = 2,
FAKE_CPL_PUT_EP_SAFE = NUM_CPL_CMDS + 0,
@@ -1118,6 +1123,7 @@ static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen)
*/
skb_get(skb);
set_wr_txq(skb, CPL_PRIORITY_DATA, ep->txq_idx);
+ t4_set_arp_err_handler(skb, NULL, mpa_start_arp_failure);
BUG_ON(ep->mpa_skb);
ep->mpa_skb = skb;
ep->snd_seq += mpalen;
@@ -1202,6 +1208,7 @@ static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen)
* Function fw4_ack() will deref it.
*/
skb_get(skb);
+ t4_set_arp_err_handler(skb, NULL, mpa_start_arp_failure);
ep->mpa_skb = skb;
__state_set(&ep->com, MPA_REP_SENT);
ep->snd_seq += mpalen;