[openib-general] [PATCH v2 1/2] sa_query: add generic query interfaces capable of supporting RMPP
Hal Rosenstock
halr at voltaire.com
Tue Aug 15 07:44:00 PDT 2006
On Thu, 2006-08-03 at 13:37, Sean Hefty wrote:
> The following patch adds a generic interface to send MADs to the SA.
> The primary motivation of adding these calls is to expand the SA query
> interface to include RMPP responses for users wanting more than a
> single attribute returned from a query (e.g. multipath record queries).
Do you mean multiple path records rather than multipath record queries
here ?
> The implementation of existing SA query routines was layered on top of
> the generic query interface.
>
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>
[snip...]
> +/* Return size of SA attributes on the wire. */
> +static int sa_mad_attr_size(int attr_id)
> +{
> + int size;
> +
> + switch (attr_id) {
> + case IB_SA_ATTR_SERVICE_REC:
> + size = 176;
> + break;
> + case IB_SA_ATTR_PATH_REC:
> + size = 64;
> + break;
> + case IB_SA_ATTR_MC_MEMBER_REC:
> + size = 52;
You probably already found this but this should be 56 as SA attributes
are required to be modulo 8 in size.
> + break;
> + default:
> + size = 0;
> + break;
> + }
> + return size;
> +}
> +
-- Hal
More information about the general
mailing list