[ofa-general] [PATCH] ibutils: enhance ibis_gsi_mad_ctrl_bind() to have class version parameter

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Mon Jun 30 00:40:43 PDT 2008


Hi Oren,

Enhancing ibis_gsi_mad_ctrl_bind() to have class version parameter.
Up until now, we needed only class version 1. Congestion Control
introduced class version 2.

Signed-off-by:  Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 ibis/src/ibbbm.c             |    2 +-
 ibis/src/ibcr.c              |    2 +-
 ibis/src/ibis_api.h          |    4 ++++
 ibis/src/ibis_gsi_mad_ctrl.c |    3 ++-
 ibis/src/ibpm.c              |    2 +-
 ibis/src/ibsm.c              |    2 +-
 ibis/src/ibvs.c              |    4 ++--
 7 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/ibis/src/ibbbm.c b/ibis/src/ibbbm.c
index c23e363..ee09bdb 100644
--- a/ibis/src/ibbbm.c
+++ b/ibis/src/ibbbm.c
@@ -167,7 +167,7 @@ ibbbm_bind(

   status = ibis_gsi_mad_ctrl_bind(
     &(IbisObj.mad_ctrl),
-    BBM_CLASS,
+    BBM_CLASS, 1,
     &p_ibbbm->h_bind
     );

diff --git a/ibis/src/ibcr.c b/ibis/src/ibcr.c
index 13e4f28..50702c4 100644
--- a/ibis/src/ibcr.c
+++ b/ibis/src/ibcr.c
@@ -121,7 +121,7 @@ ibcr_bind(

   status = ibis_gsi_mad_ctrl_bind(
     &(IbisObj.mad_ctrl),
-    CR_CLASS,
+    CR_CLASS, 1,
     &p_ibcr->h_bind
     );

diff --git a/ibis/src/ibis_api.h b/ibis/src/ibis_api.h
index ba71a26..cbf935c 100644
--- a/ibis/src/ibis_api.h
+++ b/ibis/src/ibis_api.h
@@ -331,6 +331,7 @@ ib_api_status_t
 ibis_gsi_mad_ctrl_bind(
   IN ibis_gsi_mad_ctrl_t* const p_ctrl,
   IN const uint8_t mad_class,
+  IN const uint8_t class_version,
   IN osm_bind_handle_t *p_h_bind);
 /*
 * PARAMETERS
@@ -340,6 +341,9 @@ ibis_gsi_mad_ctrl_bind(
 *  mad_class
 *     [in] The specific mad class we register for.
 *
+*  class_version
+*     [in] The specific class version we register for.
+*
 *
 * RETURN VALUES
 *  None
diff --git a/ibis/src/ibis_gsi_mad_ctrl.c b/ibis/src/ibis_gsi_mad_ctrl.c
index cdbca0f..4aab145 100644
--- a/ibis/src/ibis_gsi_mad_ctrl.c
+++ b/ibis/src/ibis_gsi_mad_ctrl.c
@@ -635,6 +635,7 @@ ib_api_status_t
 ibis_gsi_mad_ctrl_bind(
   IN ibis_gsi_mad_ctrl_t* const p_ctrl,
   IN const uint8_t mad_class,
+  IN const uint8_t class_version,
   IN osm_bind_handle_t *p_h_bind)
 {
   osm_bind_info_t bind_info;
@@ -651,7 +652,7 @@ ibis_gsi_mad_ctrl_bind(
     goto Exit;
   }

-  bind_info.class_version = 1;
+  bind_info.class_version = class_version;
   bind_info.is_responder = FALSE;
   bind_info.is_report_processor = FALSE;
   bind_info.is_trap_processor = FALSE;
diff --git a/ibis/src/ibpm.c b/ibis/src/ibpm.c
index c09159d..977a1af 100644
--- a/ibis/src/ibpm.c
+++ b/ibis/src/ibpm.c
@@ -117,7 +117,7 @@ ibpm_bind(

   status = ibis_gsi_mad_ctrl_bind(
     &(IbisObj.mad_ctrl),
-    IB_MCLASS_PERF,
+    IB_MCLASS_PERF, 1,
     &p_ibpm->h_bind
     );

diff --git a/ibis/src/ibsm.c b/ibis/src/ibsm.c
index c607e75..6e48a80 100644
--- a/ibis/src/ibsm.c
+++ b/ibis/src/ibsm.c
@@ -119,7 +119,7 @@ ibsm_bind(
      be handled by the osm_vendor_bind if asked for LID route */
   status = ibis_gsi_mad_ctrl_bind(
     &(IbisObj.mad_ctrl),
-    IB_MCLASS_SUBN_LID,
+    IB_MCLASS_SUBN_LID, 1,
     &p_ibsm->lid_route_bind
     );

diff --git a/ibis/src/ibvs.c b/ibis/src/ibvs.c
index 9dca5ee..00787e5 100644
--- a/ibis/src/ibvs.c
+++ b/ibis/src/ibvs.c
@@ -121,7 +121,7 @@ ibvs_bind(

   status = ibis_gsi_mad_ctrl_bind(
     &(IbisObj.mad_ctrl),
-    VS_CLASS,
+    VS_CLASS, 1,
     &p_ibvs->h_bind
     );

@@ -132,7 +132,7 @@ ibvs_bind(

   status = ibis_gsi_mad_ctrl_bind(
     &(IbisObj.mad_ctrl),
-	 IB_MCLASS_SUBN_LID,
+    IB_MCLASS_SUBN_LID, 1,
     &p_ibvs->h_smp_bind
     );

-- 
1.5.1.4




More information about the general mailing list