[OpenSM] -
authoreitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 26 Mar 2006 09:42:49 +0000 (09:42 +0000)
committereitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 26 Mar 2006 09:42:49 +0000 (09:42 +0000)
1. ib_types.h: Add defines for min/max MTU/rate
2. 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.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@252 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/include/iba/ib_types.h
ulp/opensm/user/opensm/osm_sa_mcmember_record.c

index cbbf443..97e4e38 100644 (file)
@@ -1505,7 +1505,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
@@ -4389,7 +4392,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
@@ -4400,6 +4402,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
index e69ed18..c079e06 100644 (file)
@@ -1118,12 +1118,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;
@@ -1195,12 +1195,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;