***SPAM*** Re: ***SPAM*** Re: [ofa-general] Re: [PATCH] Add pkey table support to osm_get_all_port_attrs

Hal Rosenstock hal.rosenstock at gmail.com
Fri Feb 27 05:38:27 PST 2009


On Fri, Feb 27, 2009 at 7:20 AM, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> On 06:40 Fri 27 Feb     , Hal Rosenstock wrote:
>> >>
>> >> You could return a real pkeys_size value with table filled up to
>> >> provided size.
>> >>
>> >> Otherwise (in case of just an error) how an user could know which pkey
>> >> size to provide?
>>
>> > The problem with that is that the user needs to remember how many he
>> > asked for originally. Not hard but just a detail that I expect will
>> > get lost.
>>
>> Also, should I assume you don't care about the API inconsistency issue
>> mentioned in that the user can't just request the first n ports but
>> only all ports.?
>
> Why not? num_ports pointer is in/out parameter. Could you explain what
> do you mean here by API inconsistency?

It's implementation rather than API. Not all the vendor
implementations support the semantic where num_ports is not 0 and less
than the total number of ports (and return insufficient memory for
this condition).

-- Hal

> Sasha



More information about the general mailing list