[ofa-general] Re: [PATCH v4] libibmad: Handle MAD redirection

Joachim Fenkes FENKES at de.ibm.com
Wed Jul 8 05:28:02 PDT 2009


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?

> I suppose this can be fixed down the road.

Is that an ACK? ;)

Cheers,
  Joachim



More information about the general mailing list