Revision: 3282
Author: [email protected]
Date: 8:36:09 PM, Friday, September 23, 2011
Message:
[INC] reinstate ib_port_info_compute_rate() compatible with opensm 3.3.11.
Impacts: ipoib & opensm 3.3.9
----
Modified : /gen1/trunk/inc/iba/ib_types.h
Modified : /gen1/trunk/ulp/ipoib/kernel/ipoib_port.cpp
Modified : /gen1/trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c
Modified : /gen1/trunk/ulp/opensm/user/opensm/osm_sa_mcmember_record.c
Modified : /gen1/trunk/ulp/opensm/user/opensm/osm_sa_multipath_record.c
Modified : /gen1/trunk/ulp/opensm/user/opensm/osm_sa_path_record.c

--- C:/Users/scsmith/AppData/Local/Temp/ib_types.h-revBASE.svn000.tmp.h Fri Sep 
23 20:18:38 2011
+++ 
C:/Users/scsmith/Documents/openIB-windows/OFA_SVN/ofw/gen1/trunk/inc/iba/ib_types.h
 Fri Sep 23 20:02:10 2011
@@ -5305,87 +5305,151 @@
 * SYNOPSIS
 */
 AL_INLINE uint8_t AL_API
-ib_port_info_compute_rate(
-       IN              const   ib_port_info_t* const           p_pi )
+ib_port_info_compute_rate(IN const ib_port_info_t * const p_pi,
+                         IN const int extended)
 {
-  uint8_t rate = 0;
+       uint8_t rate = 0;
 
-  switch (ib_port_info_get_link_speed_active(p_pi))
-       {
-  case IB_LINK_SPEED_ACTIVE_2_5:
-    switch (p_pi->link_width_active)
-    {
-    case IB_LINK_WIDTH_ACTIVE_1X:
-      rate = IB_PATH_RECORD_RATE_2_5_GBS;
-      break;
-      
-    case IB_LINK_WIDTH_ACTIVE_4X:
-      rate = IB_PATH_RECORD_RATE_10_GBS;
-      break;
+       if (extended) {
+               switch (ib_port_info_get_link_speed_ext_active(p_pi)) {
+               case IB_LINK_SPEED_EXT_ACTIVE_14:
+                       switch (p_pi->link_width_active) {
+                       case IB_LINK_WIDTH_ACTIVE_1X:
+                               rate = IB_PATH_RECORD_RATE_14_GBS;
+                               break;
+
+                       case IB_LINK_WIDTH_ACTIVE_4X:
+                               rate = IB_PATH_RECORD_RATE_56_GBS;
+                               break;
+
+                       case IB_LINK_WIDTH_ACTIVE_8X:
+                               rate = IB_PATH_RECORD_RATE_112_GBS;
+                               break;
+
+                       case IB_LINK_WIDTH_ACTIVE_12X:
+                               rate = IB_PATH_RECORD_RATE_168_GBS;
+                               break;
+
+                       default:
+                               rate = IB_PATH_RECORD_RATE_14_GBS;
+                               break;
+                       }
+                       break;
+               case IB_LINK_SPEED_EXT_ACTIVE_25:
+                       switch (p_pi->link_width_active) {
+                       case IB_LINK_WIDTH_ACTIVE_1X:
+                               rate = IB_PATH_RECORD_RATE_25_GBS;
+                               break;
+
+                       case IB_LINK_WIDTH_ACTIVE_4X:
+                               rate = IB_PATH_RECORD_RATE_100_GBS;
+                               break;
+
+                       case IB_LINK_WIDTH_ACTIVE_8X:
+                               rate = IB_PATH_RECORD_RATE_200_GBS;
+                               break;
+
+                       case IB_LINK_WIDTH_ACTIVE_12X:
+                               rate = IB_PATH_RECORD_RATE_300_GBS;
+                               break;
+
+                       default:
+                               rate = IB_PATH_RECORD_RATE_25_GBS;
+                               break;
+                       }
+                       break;
+               /* IB_LINK_SPEED_EXT_ACTIVE_NONE and any others */
+               default:
+                       break;
+               }
+               if (rate)
+                       return rate;
+       }
 
-       case IB_LINK_WIDTH_ACTIVE_8X:
-               rate = IB_PATH_RECORD_RATE_20_GBS;
+       switch (ib_port_info_get_link_speed_active(p_pi)) {
+       case IB_LINK_SPEED_ACTIVE_2_5:
+               switch (p_pi->link_width_active) {
+               case IB_LINK_WIDTH_ACTIVE_1X:
+                       rate = IB_PATH_RECORD_RATE_2_5_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_4X:
+                       rate = IB_PATH_RECORD_RATE_10_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_8X:
+                       rate = IB_PATH_RECORD_RATE_20_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_12X:
+                       rate = IB_PATH_RECORD_RATE_30_GBS;
+                       break;
+
+               default:
+                       rate = IB_PATH_RECORD_RATE_2_5_GBS;
+                       break;
+               }
+               break;
+       case IB_LINK_SPEED_ACTIVE_5:
+               switch (p_pi->link_width_active) {
+               case IB_LINK_WIDTH_ACTIVE_1X:
+                       rate = IB_PATH_RECORD_RATE_5_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_4X:
+                       rate = IB_PATH_RECORD_RATE_20_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_8X:
+                       rate = IB_PATH_RECORD_RATE_40_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_12X:
+                       rate = IB_PATH_RECORD_RATE_60_GBS;
+                       break;
+
+               default:
+                       rate = IB_PATH_RECORD_RATE_5_GBS;
+                       break;
+               }
+               break;
+       case IB_LINK_SPEED_ACTIVE_10:
+               switch (p_pi->link_width_active) {
+               case IB_LINK_WIDTH_ACTIVE_1X:
+                       rate = IB_PATH_RECORD_RATE_10_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_4X:
+                       rate = IB_PATH_RECORD_RATE_40_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_8X:
+                       rate = IB_PATH_RECORD_RATE_80_GBS;
+                       break;
+
+               case IB_LINK_WIDTH_ACTIVE_12X:
+                       rate = IB_PATH_RECORD_RATE_120_GBS;
+                       break;
+
+               default:
+                       rate = IB_PATH_RECORD_RATE_10_GBS;
+                       break;
+               }
                break;
-    case IB_LINK_WIDTH_ACTIVE_12X:
-      rate = IB_PATH_RECORD_RATE_30_GBS;
-      break;
-
-    default:
-      rate = IB_PATH_RECORD_RATE_2_5_GBS;
-      break;
-    }
-    break;
-  case IB_LINK_SPEED_ACTIVE_5:
-    switch (p_pi->link_width_active)
-    {
-    case IB_LINK_WIDTH_ACTIVE_1X:
-      rate = IB_PATH_RECORD_RATE_5_GBS;
-      break;
-
-    case IB_LINK_WIDTH_ACTIVE_4X:
-      rate = IB_PATH_RECORD_RATE_20_GBS;
-      break;
-
-    case IB_LINK_WIDTH_ACTIVE_12X:
-      rate = IB_PATH_RECORD_RATE_60_GBS;
-      break;
-
-    default:
-      rate = IB_PATH_RECORD_RATE_5_GBS;
-      break;
-    }
-    break;
-  case IB_LINK_SPEED_ACTIVE_10:
-    switch (p_pi->link_width_active)
-    {
-    case IB_LINK_WIDTH_ACTIVE_1X:
-      rate = IB_PATH_RECORD_RATE_10_GBS;
-      break;
-
-    case IB_LINK_WIDTH_ACTIVE_4X:
-      rate = IB_PATH_RECORD_RATE_40_GBS;
-      break;
-
-    case IB_LINK_WIDTH_ACTIVE_12X:
-      rate =IB_PATH_RECORD_RATE_120_GBS;
-      break;
-
        default:
-      rate = IB_PATH_RECORD_RATE_10_GBS;
-      break;
-    }
-    break;
-  default:
-    rate = IB_PATH_RECORD_RATE_2_5_GBS;
-    break;
+               rate = IB_PATH_RECORD_RATE_2_5_GBS;
+               break;
        }
 
-  return rate;
+       return rate;
 }
 /*
 * PARAMETERS
 *      p_pi
 *              [in] Pointer to a PortInfo attribute.
+*
+*      extended
+*              [in] Indicates whether or not to use extended link speeds.
 *
 * RETURN VALUES
 *      Returns the encoded value for the link speed supported.


--- C:/Users/scsmith/AppData/Local/Temp/ipoib_port.cpp-revBASE.svn000.tmp.cpp   
Fri Sep 23 20:19:35 2011
+++ 
C:/Users/scsmith/Documents/openIB-windows/OFA_SVN/ofw/gen1/trunk/ulp/ipoib/kernel/ipoib_port.cpp
    Fri Sep 23 11:57:50 2011
@@ -7854,7 +7854,8 @@
        IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT,
                ("Received port info: link width = %d.\n",
                        p_port_info->link_width_active) );
-       p_port->ib_mgr.rate = ib_port_info_compute_rate( p_port_info );
+       p_port->ib_mgr.rate = ib_port_info_compute_rate( p_port_info,
+                                                       
p_port_info->capability_mask & IB_PORT_CAP_HAS_EXT_SPEEDS );
        
        ipoib_set_rate( p_port->p_adapter,
                                        p_port_info->link_width_active,

--- 
C:/Users/scsmith/AppData/Local/Temp/osm_port_info_rcv.c-revBASE.svn000.tmp.c    
    Fri Sep 23 20:20:47 2011
+++ 
C:/Users/scsmith/Documents/openIB-windows/OFA_SVN/ofw/gen1/trunk/ulp/opensm/user/opensm/osm_port_info_rcv.c
 Fri Sep 23 11:56:57 2011
@@ -101,7 +101,7 @@
                        sm->p_subn->min_ca_mtu = mtu;
                }
 
-               rate = ib_port_info_compute_rate(p_pi);
+               rate = ib_port_info_compute_rate(p_pi,0);
                if (rate < sm->p_subn->min_ca_rate) {
                        OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
                                "Setting endport minimal rate to:%u defined by 
port:0x%"

--- 
C:/Users/scsmith/AppData/Local/Temp/osm_sa_mcmember_record.c-revBASE.svn000.tmp.c
   Fri Sep 23 20:21:41 2011
+++ 
C:/Users/scsmith/Documents/openIB-windows/OFA_SVN/ofw/gen1/trunk/ulp/opensm/user/opensm/osm_sa_mcmember_record.c
    Fri Sep 23 11:56:16 2011
@@ -341,7 +341,7 @@
                return FALSE;
        }
 
-       rate_required = ib_port_info_compute_rate(&p_physp->port_info);
+       rate_required = ib_port_info_compute_rate(&p_physp->port_info,0);
        rate_mgrp = (uint8_t) (p_mgrp->mcmember_rec.rate & 0x3F);
        if (rate_required < rate_mgrp) {
                OSM_LOG(p_log, OSM_LOG_VERBOSE,
@@ -699,7 +699,7 @@
        p_mcm_rec->mtu = (mtu_sel << 6) | mtu;
 
        port_rate =
-           p_physp ? ib_port_info_compute_rate(&p_physp->port_info) : 0;
+           p_physp ? ib_port_info_compute_rate(&p_physp->port_info,0) : 0;
        if (!(comp_mask & IB_MCR_COMPMASK_RATE)
            || !(comp_mask & IB_MCR_COMPMASK_RATE_SEL)
            || (rate_sel = (p_mcm_rec->rate >> 6)) == 3)

--- 
C:/Users/scsmith/AppData/Local/Temp/osm_sa_multipath_record.c-revBASE.svn000.tmp.c
  Fri Sep 23 20:22:27 2011
+++ 
C:/Users/scsmith/Documents/openIB-windows/OFA_SVN/ofw/gen1/trunk/ulp/opensm/user/opensm/osm_sa_multipath_record.c
   Fri Sep 23 11:56:00 2011
@@ -189,7 +189,7 @@
        p_pi = &p_physp->port_info;
 
        mtu = ib_port_info_get_mtu_cap(p_pi);
-       rate = ib_port_info_compute_rate(p_pi);
+       rate = ib_port_info_compute_rate(p_pi,0);
 
        /*
           Mellanox Tavor device performance is better using 1K MTU.
@@ -361,8 +361,8 @@
                if (mtu > ib_port_info_get_mtu_cap(p_pi))
                        mtu = ib_port_info_get_mtu_cap(p_pi);
 
-               if (rate > ib_port_info_compute_rate(p_pi))
-                       rate = ib_port_info_compute_rate(p_pi);
+               if (rate > ib_port_info_compute_rate(p_pi,0))
+                       rate = ib_port_info_compute_rate(p_pi,0);
 
                /*
                   Continue with the egress port on this switch.
@@ -384,8 +384,8 @@
                if (mtu > ib_port_info_get_mtu_cap(p_pi))
                        mtu = ib_port_info_get_mtu_cap(p_pi);
 
-               if (rate > ib_port_info_compute_rate(p_pi))
-                       rate = ib_port_info_compute_rate(p_pi);
+               if (rate > ib_port_info_compute_rate(p_pi,0))
+                       rate = ib_port_info_compute_rate(p_pi,0);
 
                if (sa->p_subn->opt.qos) {
                        /*
@@ -417,8 +417,8 @@
        if (mtu > ib_port_info_get_mtu_cap(p_pi))
                mtu = ib_port_info_get_mtu_cap(p_pi);
 
-       if (rate > ib_port_info_compute_rate(p_pi))
-               rate = ib_port_info_compute_rate(p_pi);
+       if (rate > ib_port_info_compute_rate(p_pi,0))
+               rate = ib_port_info_compute_rate(p_pi,0);
 
        OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
                "Path min MTU = %u, min rate = %u\n", mtu, rate);

--- 
C:/Users/scsmith/AppData/Local/Temp/osm_sa_path_record.c-revBASE.svn000.tmp.c   
    Fri Sep 23 20:23:23 2011
+++ 
C:/Users/scsmith/Documents/openIB-windows/OFA_SVN/ofw/gen1/trunk/ulp/opensm/user/opensm/osm_sa_path_record.c
        Fri Sep 23 11:55:38 2011
@@ -194,7 +194,7 @@
        p_osm = sa->p_subn->p_osm;
 
        mtu = ib_port_info_get_mtu_cap(p_pi);
-       rate = ib_port_info_compute_rate(p_pi);
+       rate = ib_port_info_compute_rate(p_pi,0);
 
        /*
           Mellanox Tavor device performance is better using 1K MTU.
@@ -348,8 +348,8 @@
                if (mtu > ib_port_info_get_mtu_cap(p_pi))
                        mtu = ib_port_info_get_mtu_cap(p_pi);
 
-               if (rate > ib_port_info_compute_rate(p_pi))
-                       rate = ib_port_info_compute_rate(p_pi);
+               if (rate > ib_port_info_compute_rate(p_pi,0))
+                       rate = ib_port_info_compute_rate(p_pi,0);
 
                /*
                   Continue with the egress port on this switch.
@@ -371,8 +371,8 @@
                if (mtu > ib_port_info_get_mtu_cap(p_pi))
                        mtu = ib_port_info_get_mtu_cap(p_pi);
 
-               if (rate > ib_port_info_compute_rate(p_pi))
-                       rate = ib_port_info_compute_rate(p_pi);
+               if (rate > ib_port_info_compute_rate(p_pi,0))
+                       rate = ib_port_info_compute_rate(p_pi,0);
 
                if (sa->p_subn->opt.qos) {
                        /*
@@ -424,8 +424,8 @@
        if (mtu > ib_port_info_get_mtu_cap(p_pi))
                mtu = ib_port_info_get_mtu_cap(p_pi);
 
-       if (rate > ib_port_info_compute_rate(p_pi))
-               rate = ib_port_info_compute_rate(p_pi);
+       if (rate > ib_port_info_compute_rate(p_pi,0))
+               rate = ib_port_info_compute_rate(p_pi,0);
 
        OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
                "Path min MTU = %u, min rate = %u\n", mtu, rate);

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to