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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html