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

Hal Rosenstock hal.rosenstock at gmail.com
Thu Feb 26 13:43:08 PST 2009


On Thu, Feb 26, 2009 at 4:25 PM, Sasha Khapyorsky <sashak at voltaire.com> wrote:
> On 07:03 Thu 26 Feb     , Hal Rosenstock wrote:
>> >> + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? r = IB_INSUFFICIENT_MEMORY;
>> >> + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? OSM_LOG(p_vend->p_log,
>> >> + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? OSM_LOG_ERROR,
>> >> + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? "ERR 5419: Insufficient memory for pkeys for port %d; need space for %d pkeys\n",
>> >> + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? j,
>> >> + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ca.ports[j]->pkeys_size);
>> >
>> > Also should it be an error? May be it is just enough to fill requested
>> > pkey entries?
>>
>> I agree that being more forgiving is better but then how would it be
>> known if the pkeys are being truncated ?
>
> 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.

-- Hal

> Sasha
>



More information about the general mailing list