Prints the IP address of the remote host when critical asynchronous event is
received.

Signed-off-by: Tatyana Nikolova <tatyana.e.nikol...@intel.com>
Signed-off-by: Faisal Latif <faisal.la...@intel.com>

diff --git a/kernel_patches/fixes/nes_0059_print_ip.patch 
b/kernel_patches/fixes/nes_0059_print_ip.patch
new file mode 100644
index 0000000..ac84d4d
--- /dev/null
+++ b/kernel_patches/fixes/nes_0059_print_ip.patch
@@ -0,0 +1,31 @@
+diff --git a/drivers/infiniband/hw/nes/nes_hw.c 
b/drivers/infiniband/hw/nes/nes_hw.c
+index 855a062..dd15e94 100644
+--- a/drivers/infiniband/hw/nes/nes_hw.c
++++ b/drivers/infiniband/hw/nes/nes_hw.c
+@@ -109,6 +109,15 @@ static unsigned char *nes_tcp_state_str[] = {
+ };
+ #endif
+
++static inline void print_ip(struct nes_cm_node *cm_node)
++{
++      unsigned char *rem_addr;
++      if (cm_node) {
++              rem_addr = (unsigned char *)&cm_node->rem_addr;
++              printk(KERN_ERR PFX "Remote ip addr = %u.%u.%u.%u\n",
++                      rem_addr[3], rem_addr[2], rem_addr[1], rem_addr[0]);
++      }
++}
+
+ /**
+  * nes_nic_init_timer_defaults
+@@ -3701,6 +3710,7 @@ static void nes_process_iwarp_aeqe(struct nes_device 
*nesdev,
+               case NES_AEQE_AEID_ROE_INVALID_RDMA_WRITE_OR_READ_RESP:
+                       printk(KERN_ERR PFX "QP[%u] async_event_id=0x%04X 
IB_EVENT_QP_FATAL\n",
+                                       nesqp->hwqp.qp_id, async_event_id);
++                      print_ip(nesqp->cm_node);
+                       if (!atomic_read(&nesqp->close_timer_started)) {
+                               nes_terminate_connection(nesdev, nesqp, aeqe, 
IB_EVENT_QP_FATAL);
+                       }
+--
+1.7.4.2
+
-- 
1.7.4.2

_______________________________________________
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to