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

Hal Rosenstock hal.rosenstock at gmail.com
Tue Jun 30 11:37:26 PDT 2009


On Tue, Jun 30, 2009 at 2:00 PM, Jason
Gunthorpe<jgunthorpe at obsidianresearch.com> wrote:
> On Tue, Jun 30, 2009 at 02:04:03PM +0200, Joachim Fenkes wrote:
>> On Tuesday 30 June 2009 00:01, Hal Rosenstock wrote:
>> > On Mon, Jun 29, 2009 at 8:10 AM, Joachim Fenkes<fenkes at de.ibm.com> wrote:
>>
>> > > Previously, libibmad reacted to GSI MAD responses with a "redirect" status
>> > > by throwing an error. IBM eHCA adapters use redirection, so most
>> > > infiniband_diags tools didn't work against eHCA.
>> >
>> > Are there GS classes other than PerfMgt which would be redirected by eHCA ?
>>
>> Not right now, no. If you're interested in the details of how and when the
>> eHCA driver redirects, please have a look at drivers/infiniband/hw/ehca/ehca_sqp.c.
>
> Hmm.. That definately doesn't look right overall. You are not forming
> the redirect reply in a way that will work with all possible
> fabrics. You can't just return a 0 SL and the default PKey and assume
> things will work out.
>
> It looks like all you want to do is redirect to a different QPN? If so
> I recommend you copy all the values from the incoming MAD's LRH and,
> if present, GRH into the ClassPortInfo reply. Copy the PKey too.
>
> This way you have the best chance of sending back the right information.

Agreed.

> If there is no GRH then you can use GID index 0 and a 0 TC and a 0
> FL. According to the spec returning the port GID is NOT optional.

These are not needed when using LID based redirection (see
ClassPortInfo RedirectLID description).

-- Hal

>> > > +            /* update dport for next request and retry */
>> > > +            dport->lid = mad_get_field(mad, 64, IB_CPI_REDIRECT_LID_F);
>> > > +            dport->qp = mad_get_field(mad, 64, IB_CPI_REDIRECT_QP_F);
>> > > +            dport->qkey = mad_get_field(mad, 64, IB_CPI_REDIRECT_QKEY_F);
>
> This code sould also check for 0 LID and bail.
>
> Jason
>



More information about the ewg mailing list