From: Sagi Grimberg <sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v5 1/6] IB/core, cma: Nice log-friendly string helpers
Date: Tue, 12 May 2015 16:33:51 +0300 [thread overview]
Message-ID: <5552013F.6060008@dev.mellanox.co.il> (raw)
In-Reply-To: <CAJ3xEMhOnrZJrUfwtMs7Tod7YeGy_Be6yF543+xds_05hO-F-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 5/12/2015 3:59 PM, Or Gerlitz wrote:
> On Tue, May 12, 2015 at 3:05 PM, Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
>> Some of us keep revisiting the code to decode enumerations that
>> appear in out logs. Let's borrow the nice logging helpers that
>> exists in xprtrdma and rds for CMA events, IB events and WC statuses.
>
> [...]
>
>> +static const char * const cma_events[] = {
>> + [RDMA_CM_EVENT_ADDR_RESOLVED] = "ADDR_RESOLVED",
>> + [RDMA_CM_EVENT_ADDR_ERROR] = "ADDR_ERROR",
>> + [RDMA_CM_EVENT_ROUTE_RESOLVED] = "ROUTE_RESOLVED",
>> + [RDMA_CM_EVENT_ROUTE_ERROR] = "ROUTE_ERROR",
>> + [RDMA_CM_EVENT_CONNECT_REQUEST] = "CONNECT_REQUEST",
>> + [RDMA_CM_EVENT_CONNECT_RESPONSE]= "CONNECT_RESPONSE",
>> + [RDMA_CM_EVENT_CONNECT_ERROR] = "CONNECT_ERROR",
>> + [RDMA_CM_EVENT_UNREACHABLE] = "UNREACHABLE",
>> + [RDMA_CM_EVENT_REJECTED] = "REJECTED",
>> + [RDMA_CM_EVENT_ESTABLISHED] = "ESTABLISHED",
>> + [RDMA_CM_EVENT_DISCONNECTED] = "DISCONNECTED",
>> + [RDMA_CM_EVENT_DEVICE_REMOVAL] = "DEVICE_REMOVAL",
>> + [RDMA_CM_EVENT_MULTICAST_JOIN] = "MULTICAST_JOIN",
>> + [RDMA_CM_EVENT_MULTICAST_ERROR] = "MULTICAST_ERROR",
>> + [RDMA_CM_EVENT_ADDR_CHANGE] = "ADDR_CHANGE",
>> + [RDMA_CM_EVENT_TIMEWAIT_EXIT] = "TIMEWAIT_EXIT",
>> +};
>
> Sagi,
>
> My vote goes to using easy-to-digest human-readable non-capital
> letters strings here and
> elsewhere (IB events, etc), as done today by the NFS code and
> generally by errno based
> helpers such as strerror, e.g
>
> "address resolved"
> "address error"
> "route resolved"
>
> Will be happy to hear what others think
Let's do that before I post v6...
--
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
next prev parent reply other threads:[~2015-05-12 13:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 12:05 Generic logging helpers [v5] Sagi Grimberg
[not found] ` <1431432329-859-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-12 12:05 ` [PATCH v5 1/6] IB/core, cma: Nice log-friendly string helpers Sagi Grimberg
[not found] ` <1431432329-859-2-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-12 12:59 ` Or Gerlitz
[not found] ` <CAJ3xEMhOnrZJrUfwtMs7Tod7YeGy_Be6yF543+xds_05hO-F-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-12 13:33 ` Sagi Grimberg [this message]
2015-05-12 13:56 ` Chuck Lever
[not found] ` <E27932C3-BDF3-4FED-ABD6-416454EFA5C0-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-05-12 17:21 ` Doug Ledford
2015-05-12 12:05 ` [PATCH v5 2/6] IB/srp: Align to generic logging helpers Sagi Grimberg
2015-05-12 12:05 ` [PATCH v5 3/6] IB/iser: " Sagi Grimberg
2015-05-12 12:05 ` [PATCH v5 4/6] iser-target: " Sagi Grimberg
2015-05-12 12:05 ` [PATCH v5 5/6] xprtrdma: Switch " Sagi Grimberg
[not found] ` <1431432329-859-6-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-12 12:40 ` Yann Droneaud
[not found] ` <1431434425.25060.65.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-05-12 13:08 ` Sagi Grimberg
2015-05-12 12:05 ` [PATCH v5 6/6] RDS: " Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5552013F.6060008@dev.mellanox.co.il \
--to=sagig-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.