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

Hal Rosenstock hal.rosenstock at gmail.com
Wed Jul 1 08:54:13 PDT 2009


On Wed, Jul 1, 2009 at 11:14 AM, Jason
Gunthorpe<jgunthorpe at obsidianresearch.com> wrote:
> On Wed, Jul 01, 2009 at 09:59:41AM -0400, Hal Rosenstock wrote:
>
>> > +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;
>> > + ?? ?? ?? }
>>
>> Sorry for the confusion: determination of GID redirection should be
>> based on a comparison of the RedirectGID to 0. It's valid to supply
>> both a non zero RedirectGID and RedirectLID.
>
> ?? The above is correct. As I said, RedirectGID is not allowed to be 0.

I think it depends on the interpretation of "If redirection is not being
performed, this shall be set to zero." in the RedirectGID description
as to whether it is referring to redirection in general or just GID
redirection.

Futhermore, RedirectLID can be non zero but GID redirection is still
being used as indicated by the RedirectLID description indicating that
a non zero RedirectLID will in general not be valid.

-- Hal

>
> Jason
>



More information about the general mailing list