From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: "Eli Dorfman (Voltaire)"
<dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] infiniband-diags/saquery: Report SA MAD Class specific status.
Date: Mon, 2 Nov 2009 14:20:26 +0200 [thread overview]
Message-ID: <20091102122026.GC21577@me> (raw)
In-Reply-To: <4AEEA4D6.8070109-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 11:22 Mon 02 Nov , Eli Dorfman (Voltaire) wrote:
> >> +
> >> +static inline void report_err(int status)
> >> +{
> >> + int st = status & 0xff;
> >> +
> >> + if (st)
> >> + fprintf(stderr, "ERROR: Query result returned: %s (0x%x)\n",
> >> + ib_get_err_str(st), status);
> >> + st = status >> 8;
> >> + if (st)
> >> + fprintf(stderr, "ERROR: Query result returned: %s (0x%x)\n",
> >> + ib_sa_err_str(st), status);
> >
> > Such two identical messages with different error strings seems
> > confusing to me. Wouldn't it be better to merge it in a single line,
> > like:
> >
> > ERROR: Query result returned 0xNNNN: SM blah1 , SA blah2
> >
> > (or similar), with making each part optional.
>
> I agree.
> Is it possible according to the spec to have both SM and SA (i don't think so)
I don't know really, don't remember that it stated somewhere in the spec
explicitly. But even if so - it is slightly dangerous to assume in the
code that this will never happen.
Sasha
--
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:[~2009-11-02 12:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 8:09 [PATCH] infiniband-diags/saquery: Report SA MAD Class specific status Eli Dorfman (Voltaire)
[not found] ` <4AED4241.4000808-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-11-01 16:52 ` Sasha Khapyorsky
2009-11-02 9:22 ` Eli Dorfman (Voltaire)
[not found] ` <4AEEA4D6.8070109-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-11-02 12:20 ` Sasha Khapyorsky [this message]
2009-11-02 9:40 ` [PATCH v2] " Eli Dorfman (Voltaire)
[not found] ` <4AEEA903.4030406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-11-02 12:25 ` Sasha Khapyorsky
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=20091102122026.GC21577@me \
--to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
--cc=dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox