Commit 6224c7ee authored by Faisal Latif's avatar Faisal Latif Committed by Roland Dreier

RDMA/nes: Print IP address for critcal errors

Print the IP address of the remote host when a critical asynchronous event is
received.
Signed-off-by: default avatarTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: default avatarFaisal Latif <Faisal.Latif@intel.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent bab3a9f4
...@@ -110,6 +110,14 @@ static unsigned char *nes_tcp_state_str[] = { ...@@ -110,6 +110,14 @@ static unsigned char *nes_tcp_state_str[] = {
}; };
#endif #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: %pI4\n", rem_addr);
}
}
/** /**
* nes_nic_init_timer_defaults * nes_nic_init_timer_defaults
...@@ -3694,6 +3702,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -3694,6 +3702,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
case NES_AEQE_AEID_ROE_INVALID_RDMA_WRITE_OR_READ_RESP: 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", printk(KERN_ERR PFX "QP[%u] async_event_id=0x%04X IB_EVENT_QP_FATAL\n",
nesqp->hwqp.qp_id, async_event_id); nesqp->hwqp.qp_id, async_event_id);
print_ip(nesqp->cm_node);
if (!atomic_read(&nesqp->close_timer_started)) if (!atomic_read(&nesqp->close_timer_started))
nes_terminate_connection(nesdev, nesqp, aeqe, IB_EVENT_QP_FATAL); nes_terminate_connection(nesdev, nesqp, aeqe, IB_EVENT_QP_FATAL);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment