* [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
@ 2011-09-26 1:33 Faisal Latif
2011-10-06 19:53 ` Roland Dreier
0 siblings, 1 reply; 4+ messages in thread
From: Faisal Latif @ 2011-09-26 1:33 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Prints the IP address of the remote host when critical asynchronous event is
received.
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Faisal Latif <Faisal.Latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/nes/nes_hw.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index da2548d..cae26f4 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -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);
}
--
1.7.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
2011-09-26 1:33 [PATCH 2/3] RDMA/nes: Print ip address for critcal errors Faisal Latif
@ 2011-10-06 19:53 ` Roland Dreier
[not found] ` <CAL1RGDU+xag8AtQ18yrZmqU24u9QM6cajhca4MmrCGtmPbxKLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Roland Dreier @ 2011-10-06 19:53 UTC (permalink / raw)
To: Faisal Latif; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
> + 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
[not found] ` <CAL1RGDU+xag8AtQ18yrZmqU24u9QM6cajhca4MmrCGtmPbxKLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-10-10 19:00 ` Latif, Faisal
[not found] ` <2EFBCAEF10980645BBCFB605689E08E904EC29E1CE-uLM7Qlg6MbdZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Latif, Faisal @ 2011-10-10 19:00 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Roland,
Sorry for late reply. Yes %pI4 would be a lot cleaner. Do you want me to resubmit this patch again?
Thanks
Faisal
> -----Original Message-----
> From: roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org [mailto:roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org] On Behalf
> Of Roland Dreier
> Sent: Thursday, October 06, 2011 2:54 PM
> To: Latif, Faisal
> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: Re: [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
>
> > + 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
[not found] ` <2EFBCAEF10980645BBCFB605689E08E904EC29E1CE-uLM7Qlg6MbdZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2011-10-10 19:14 ` Roland Dreier
0 siblings, 0 replies; 4+ messages in thread
From: Roland Dreier @ 2011-10-10 19:14 UTC (permalink / raw)
To: Latif, Faisal; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Actually I fixed it up myself, please check my result :)
On Mon, Oct 10, 2011 at 12:00 PM, Latif, Faisal <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> Hi Roland,
>
> Sorry for late reply. Yes %pI4 would be a lot cleaner. Do you want me to resubmit this patch again?
>
> Thanks
> Faisal
>
>
>> -----Original Message-----
>> From: roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org [mailto:roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org] On Behalf
>> Of Roland Dreier
>> Sent: Thursday, October 06, 2011 2:54 PM
>> To: Latif, Faisal
>> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Subject: Re: [PATCH 2/3] RDMA/nes: Print ip address for critcal errors
>>
>> > + 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-10 19:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 1:33 [PATCH 2/3] RDMA/nes: Print ip address for critcal errors Faisal Latif
2011-10-06 19:53 ` Roland Dreier
[not found] ` <CAL1RGDU+xag8AtQ18yrZmqU24u9QM6cajhca4MmrCGtmPbxKLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-10 19:00 ` Latif, Faisal
[not found] ` <2EFBCAEF10980645BBCFB605689E08E904EC29E1CE-uLM7Qlg6MbdZtRGVdHMbwrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-10-10 19:14 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox