***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 03:40:54 PST 2009


On Thu, Feb 26, 2009 at 4:43 PM, Hal Rosenstock
<hal.rosenstock at gmail.com> wrote:
> 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.

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.?

-- Hal

> -- Hal
>
>> Sasha
>>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>



More information about the general mailing list