[ofa-general] Re: [PATCH v4] libibmad: Handle MAD redirection
Hal Rosenstock
hal.rosenstock at gmail.com
Wed Jul 8 06:24:53 PDT 2009
On 7/8/09, Joachim Fenkes <FENKES at de.ibm.com> wrote:
> Hal Rosenstock <hal.rosenstock at gmail.com> wrote on 07.07.2009 17:23:18:
>
>> > +static int redirect_port(ib_portid_t *port, uint8_t *mad)
>> > +{
>> > + port->lid = mad_get_field(mad, 64, IB_CPI_REDIRECT_LID_F);
>> > + if (!port->lid) {
>> > + IBWARN("GID-based redirection is not supported");
>> > + return -1;
>> > + }
>>
>> I hate to keep beating this horse but the lack of a LID certainly
>> means GID based redirection when the GID is not 0, IMO this LID check
>> is insufficient in general.
>
> If the LID is given, my code does the right thing by redirecting
> regardless
> of any GID, as the spec requires. If no LID is given, but a GID is, my
> code
> bails with an error stating that GID-based redirection is not supported.
> If
> both GID and LID are 0, that's an error and my code bails with an error
> message (which may or may not be misleading depending on your perspective,
> but frankly I couldn't care less about broken agents).
>
> Which of those three reactions do you think is insufficient?
It looks to me like both GID and LID are allowed to be specified in
the redirect and if so, there is the possibility of GID based
redirection there (as well as when LID is 0) and it is the requester
which decides on GRH inclusion or not.
>> I suppose this can be fixed down the road.
>
> Is that an ACK? ;)
Indeed, a qualified ACK :-) This case that concerns me ends up
entangled in the to be specified multiple IB subnet case (router
spec).
-- Hal
> Cheers,
> Joachim
>
More information about the general
mailing list