RDMA/nes: Print ip address for critcal errors
PATCH 2/3 RDMA/nes: Print ip address for critcal errors
Prints the IP address of the remote host when critical asynchronous event is received.
--- drivers/infiniband/hw/nes/nes_hw.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/infiniband/hw/nes/nes_hw.c +10 -0
@@ -110,6 +110,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
@@ -3700,6 +3709,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 ); }
Signature · 6 lines
1.7.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines
+ printk(KERN_ERR PFX "Remote ip addr = %u.%u.%u.%u\n",
+ rem_addr[3], rem_addr[2], rem_addr[1], rem_addr[0]);
Any reason this couldn't use %pI4 and be a lot cleaner?
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Roland,
Sorry for late reply. Yes %pI4 would be a lot cleaner. Do you want me to resubmit this patch again?
Thanks
Faisal
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Roland Dreier
Sent: Thursday, October 06, 2011 2:54 PM
To: Latif, Faisal
Cc: [email protected]
Subject: Re: [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
Quoted 7 lines
Quoted 2 lines
+ printk(KERN_ERR PFX "Remote ip addr = %u.%u.%u.%u\n",
+ rem_addr[3], rem_addr[2], rem_addr[1],rem_addr[0]);
Any reason this couldn't use %pI4 and be a lot cleaner?
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Actually I fixed it up myself, please check my result :)
Quoted 24 lines · Faisal
Hi Roland,
Sorry for late reply. Yes %pI4 would be a lot cleaner. Do you want me to resubmit this patch again?
Thanks
FaisalQuoted 15 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Roland Dreier
Sent: Thursday, October 06, 2011 2:54 PM
To: Latif, Faisal
Cc: [email protected]
Subject: Re: [PATCH 2/3] RDMA/nes: Print ip address for critcal errorsQuoted 2 lines
+ printk(KERN_ERR PFX "Remote ip addr = %u.%u.%u.%u\n",
+ rem_addr[3], rem_addr[2], rem_addr[1],rem_addr[0]);
Any reason this couldn't use %pI4 and be a lot cleaner?
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html