[openib-general] [PATCH] OpenSM/SA client API: Support attribute modifer in user defined requests

Hal Rosenstock halr at voltaire.com
Mon Jul 10 03:07:43 PDT 2006


OpenSM/SA client API: Support attribute modifer in user defined requests

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: include/vendor/osm_vendor_sa_api.h
===================================================================
--- include/vendor/osm_vendor_sa_api.h	(revision 8461)
+++ include/vendor/osm_vendor_sa_api.h	(working copy)
@@ -192,6 +192,7 @@ typedef struct _osmv_user_query
 	uint8_t					method;
 	ib_net16_t				attr_id;
 	ib_net16_t				attr_offset;
+	ib_net32_t				attr_mod;
 	ib_net64_t				comp_mask;
 	void					*p_attr;
 }	osmv_user_query_t;
@@ -209,6 +210,9 @@ typedef struct _osmv_user_query
 *		this value by passing in the sizeof( attribute ) into the
 *		ib_get_attr_offset() routine.
 *
+*	attr_mod
+*		Attribute modifier for query request.
+*
 *	comp_mask
 *		Indicates the attribute components that are specified for the
 *		query.
Index: libvendor/osm_vendor_mlx_sa.c
===================================================================
--- libvendor/osm_vendor_mlx_sa.c	(revision 8461)
+++ libvendor/osm_vendor_mlx_sa.c	(working copy)
@@ -452,6 +452,7 @@ typedef struct _osmv_sa_mad_data
   uint8_t method;
   ib_net16_t attr_id;
   ib_net16_t attr_offset;
+  ib_net32_t attr_mod;
   ib_net64_t comp_mask;
   void *p_attr;
 } osmv_sa_mad_data_t;
@@ -465,6 +466,9 @@ typedef struct _osmv_sa_mad_data
  *  attr_offset
  *     Offset as defined by RMPP
  *
+ *  attr_mod
+ *     Attribute modifier
+ *
  *  comp_mask
  *     The component mask of the query
  *
@@ -548,7 +552,7 @@ __osmv_send_sa_req(
     p_sa_mad_data->method,             /* method */
     cl_hton64( ( uint64_t ) trans_id ),/* tid */
     p_sa_mad_data->attr_id,            /* attr id */
-    0                                  /* attr mod */
+    p_sa_mad_data->attr_mod            /* attr mod */
     );
 
   /* Set the query information. */
@@ -640,6 +644,7 @@ osmv_query_sa(
 
   /* Set the request information. */
   sa_mad_data.method = IB_MAD_METHOD_GETTABLE;
+  sa_mad_data.attr_mod = 0;
 
   /* Set the MAD attributes and component mask correctly. */
   switch ( p_query_req->query_type )
@@ -652,6 +657,7 @@ osmv_query_sa(
     if (p_user_query->method) sa_mad_data.method = p_user_query->method;
     sa_mad_data.attr_offset = p_user_query->attr_offset;
     sa_mad_data.attr_id = p_user_query->attr_id;
+    sa_mad_data.attr_mod = p_user_query->attr_mod;
     sa_mad_data.comp_mask = p_user_query->comp_mask;
     sa_mad_data.p_attr = p_user_query->p_attr;
     break;
Index: libvendor/osm_vendor_ibumad_sa.c
===================================================================
--- libvendor/osm_vendor_ibumad_sa.c	(revision 8461)
+++ libvendor/osm_vendor_ibumad_sa.c	(working copy)
@@ -444,6 +444,7 @@ typedef struct _osmv_sa_mad_data
   uint8_t method;
   ib_net16_t attr_id;
   ib_net16_t attr_offset;
+  ib_net32_t attr_mod;
   ib_net64_t comp_mask;
   void *p_attr;
 } osmv_sa_mad_data_t;
@@ -457,6 +458,9 @@ typedef struct _osmv_sa_mad_data
  *  attr_offset
  *     Offset as defined by RMPP
  *
+ *  attr_mod
+ *     Attribute modifier
+ *
  *  comp_mask
  *     The component mask of the query
  *
@@ -540,7 +544,7 @@ __osmv_send_sa_req(
     p_sa_mad_data->method,             /* method */
     cl_hton64( ( uint64_t ) trans_id ),/* tid */
     p_sa_mad_data->attr_id,            /* attr id */
-    0                                  /* attr mod */
+    p_sa_mad_data->attr_mod            /* attr mod */
     );
 
   /* Set the query information. */
@@ -635,6 +639,7 @@ osmv_query_sa(
 
   /* Set the request information. */
   sa_mad_data.method = IB_MAD_METHOD_GETTABLE;
+  sa_mad_data.attr_mod = 0;
 
   /* Set the MAD attributes and component mask correctly. */
   switch ( p_query_req->query_type )
@@ -648,6 +653,7 @@ osmv_query_sa(
       sa_mad_data.method = p_user_query->method;
     sa_mad_data.attr_offset = p_user_query->attr_offset;
     sa_mad_data.attr_id = p_user_query->attr_id;
+    sa_mad_data.attr_mod = p_user_query->attr_mod;
     sa_mad_data.comp_mask = p_user_query->comp_mask;
     sa_mad_data.p_attr = p_user_query->p_attr;
     break;
Index: libvendor/libosmvendor.ver
===================================================================
--- libvendor/libosmvendor.ver	(revision 8461)
+++ libvendor/libosmvendor.ver	(working copy)
@@ -6,4 +6,4 @@
 # API_REV - advance on any added API
 # RUNNING_REV - advance any change to the vendor files
 # AGE - number of backward versions the API still supports
-LIBVERSION=1:0:0
+LIBVERSION=2:0:0







More information about the general mailing list