[openib-general] [PATCH v1] opensm: Disregard subn->min_ca_rate/mtu during MC Group creation.

Sasha Khapyorsky sashak at voltaire.com
Thu Mar 23 11:41:38 PST 2006


Hello,

There is updated patch.

Sasha.


Disregard subn->ca_min_mtu and subn->ca_min_rate when new MC group is
created and exact MTU and/or rate values are specified.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---

 osm/include/iba/ib_types.h          |    9 +++++++--
 osm/opensm/osm_sa_mcmember_record.c |   12 ++++++------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/osm/include/iba/ib_types.h b/osm/include/iba/ib_types.h
index d30b547..83bb55e 100644
--- a/osm/include/iba/ib_types.h
+++ b/osm/include/iba/ib_types.h
@@ -1479,7 +1479,10 @@ ib_class_is_vendor_specific(
 #define IB_MTU_LEN_1024							3
 #define IB_MTU_LEN_2048							4
 #define IB_MTU_LEN_4096							5
-#define IB_MAX_MTU                        5
+
+#define IB_MIN_MTU    IB_MTU_LEN_256
+#define IB_MAX_MTU    IB_MTU_LEN_4096
+
 /**********/
 
 /****d* IBA Base: Constants/IB_PATH_SELECTOR_TYPE
@@ -4363,7 +4366,6 @@ ib_port_info_get_link_speed_active(
 #define IB_LINK_SPEED_ACTIVE_10        4
 
 /* following v1 ver1.2 p901 */
-#define IB_MAX_RATE                    10
 #define IB_PATH_RECORD_RATE_2_5_GBS		2
 #define IB_PATH_RECORD_RATE_10_GBS		3
 #define IB_PATH_RECORD_RATE_30_GBS		4
@@ -4374,6 +4376,9 @@ ib_port_info_get_link_speed_active(
 #define IB_PATH_RECORD_RATE_80_GBS		9
 #define IB_PATH_RECORD_RATE_120_GBS		10
 
+#define IB_MIN_RATE    IB_PATH_RECORD_RATE_2_5_GBS
+#define IB_MAX_RATE    IB_PATH_RECORD_RATE_120_GBS 
+
 /****f* IBA Base: Types/ib_port_info_compute_rate
 * NAME
 *	ib_port_info_compute_rate
diff --git a/osm/opensm/osm_sa_mcmember_record.c b/osm/opensm/osm_sa_mcmember_record.c
index ce1d036..f720440 100644
--- a/osm/opensm/osm_sa_mcmember_record.c
+++ b/osm/opensm/osm_sa_mcmember_record.c
@@ -1121,12 +1121,12 @@ __mgrp_request_is_realizable(
       break;
     case 2: /* Exactly MTU specified */
       /* make sure it is in the range */
-      if ((1 > mtu_required) || (mtu_required > p_rcv->p_subn->min_ca_mtu))
+      if (mtu_required < IB_MIN_MTU || mtu_required > IB_MAX_MTU)
       {
         osm_log( p_log, OSM_LOG_DEBUG,
                  "__mgrp_request_is_realizable: "
-                 "Requested MTU %x out of range: 1 .. %x\n",
-                 mtu_required, p_rcv->p_subn->min_ca_mtu);
+                 "Requested MTU %x is out of range\n",
+                 mtu_required);
         return FALSE;
       }
       break;
@@ -1198,12 +1198,12 @@ __mgrp_request_is_realizable(
       break;
     case 2: /* Exactly RATE specified */
       /* make sure it is in the range */
-      if ((2 > rate_required) || (rate_required > p_rcv->p_subn->min_ca_rate))
+      if (rate_required < IB_MIN_RATE || rate_required > IB_MAX_RATE)
       {
         osm_log( p_log, OSM_LOG_DEBUG,
                  "__mgrp_request_is_realizable: "
-                 "Requested RATE %x out of range: 2 .. %x\n",
-                 rate_required, p_rcv->p_subn->min_ca_rate);
+                 "Requested RATE %x is out of range\n",
+                 rate_required);
         return FALSE;
       }
       break;



More information about the general mailing list