[openib-general] [PATCH 2/4] osm: LMC > 0 is not supported by fat-tree routing.

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Mon Jan 1 05:31:09 PST 2007


LMC > 0 is not supported by fat-tree routing.

Removing all the related code and adding check to
inform the user in case LMC is set.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 osm/opensm/osm_ucast_ftree.c |   31 +++++++++----------------------
 1 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/osm/opensm/osm_ucast_ftree.c b/osm/opensm/osm_ucast_ftree.c
index 32d1b3b..e767e64 100644
--- a/osm/opensm/osm_ucast_ftree.c
+++ b/osm/opensm/osm_ucast_ftree.c
@@ -151,9 +151,7 @@ typedef struct ftree_port_group_t_
 {
    cl_map_item_t  map_item;
    ib_net16_t     base_lid;           /* base lid of the current node */
-   uint8_t        lmc;                /* LMC of the current node */
    ib_net16_t     remote_base_lid;    /* base lid of the remote node */
-   uint8_t        remote_lmc;         /* LMC of the remote node */
    ib_net64_t     port_guid;          /* port guid of this port */
    ib_net64_t     remote_port_guid;   /* port guid of the remote port */
    ib_net64_t     remote_node_guid;   /* node guid of the remote node */
@@ -179,7 +177,6 @@ typedef struct ftree_sw_t_
    uint8_t                rank;
    ftree_tuple_t          tuple;
    ib_net16_t             base_lid;
-   uint8_t                lmc;
    ftree_port_group_t  ** down_port_groups;
    uint16_t               down_port_groups_num;
    ftree_port_group_t  ** up_port_groups;
@@ -434,9 +431,7 @@ __osm_ftree_port_destroy(
 static ftree_port_group_t * 
 __osm_ftree_port_group_create( 
    IN  ib_net16_t    base_lid,
-   IN  uint8_t       lmc,
    IN  ib_net16_t    remote_base_lid,
-   IN  uint8_t       remote_lmc,
    IN  ib_net64_t  * p_port_guid,
    IN  ib_net64_t  * p_remote_port_guid,
    IN  ib_net64_t  * p_remote_node_guid,
@@ -450,9 +445,7 @@ __osm_ftree_port_group_create(
    memset(p_group, 0, sizeof(ftree_port_group_t));
 
    p_group->base_lid = base_lid;
-   p_group->lmc = lmc;
    p_group->remote_base_lid = remote_base_lid;
-   p_group->remote_lmc = remote_lmc;
    memcpy(&p_group->port_guid, p_port_guid, sizeof(ib_net64_t));
    memcpy(&p_group->remote_port_guid, p_remote_port_guid, sizeof(ib_net64_t));
    memcpy(&p_group->remote_node_guid, p_remote_node_guid, sizeof(ib_net64_t));
@@ -725,9 +718,7 @@ __osm_ftree_sw_add_port(
    IN  uint8_t            port_num,
    IN  uint8_t            remote_port_num,
    IN  ib_net16_t         base_lid,
-   IN  uint8_t            lmc,
    IN  ib_net16_t         remote_base_lid,
-   IN  uint8_t            remote_lmc,
    IN  ib_net64_t         port_guid,
    IN  ib_net64_t         remote_port_guid,
    IN  ib_net64_t         remote_node_guid,
@@ -742,9 +733,7 @@ __osm_ftree_sw_add_port(
    {
       p_group = __osm_ftree_port_group_create(
                      base_lid,
-                     lmc,
                      remote_base_lid,
-                     remote_lmc,
                      &port_guid,
                      &remote_port_guid,
                      &remote_node_guid,
@@ -875,9 +864,7 @@ __osm_ftree_hca_add_port(
    IN  uint8_t       port_num,
    IN  uint8_t       remote_port_num,
    IN  ib_net16_t    base_lid,
-   IN  uint8_t       lmc,
    IN  ib_net16_t    remote_base_lid,
-   IN  uint8_t       remote_lmc,
    IN  ib_net64_t    port_guid,
    IN  ib_net64_t    remote_port_guid,
    IN  ib_net64_t    remote_node_guid,
@@ -896,9 +883,7 @@ __osm_ftree_hca_add_port(
    {
       p_group = __osm_ftree_port_group_create(
                      base_lid,
-                     lmc,
                      remote_base_lid,
-                     remote_lmc,
                      &port_guid,
                      &remote_port_guid,
                      &remote_node_guid,
@@ -2559,9 +2544,7 @@ __osm_ftree_fabric_construct_hca_ports(
             i,                                         /* local port number */
             remote_port_num,                           /* remote port number */
             osm_node_get_base_lid(p_node, i),          /* local lid */
-            osm_node_get_lmc(p_node, i),               /* local lmc */
             osm_node_get_base_lid(p_remote_node, 0),   /* remote lid */
-            osm_node_get_lmc(p_remote_node, 0),        /* remote lmc */
             osm_physp_get_port_guid(p_osm_port),       /* local port guid */
             osm_physp_get_port_guid(p_remote_osm_port),/* remote port guid */
             remote_node_guid,                          /* remote node guid */
@@ -2586,7 +2569,6 @@ __osm_ftree_fabric_construct_sw_ports(
    osm_node_t        * p_node = osm_switch_get_node_ptr(p_sw->p_osm_sw);
    osm_node_t        * p_remote_node;
    ib_net16_t          remote_base_lid;
-   uint8_t             remote_lmc;
    uint8_t             remote_node_type;
    ib_net64_t          remote_node_guid;
    osm_physp_t       * p_remote_osm_port;
@@ -2634,7 +2616,6 @@ __osm_ftree_fabric_construct_sw_ports(
             direction = FTREE_DIRECTION_DOWN;
 
             remote_base_lid = osm_physp_get_base_lid(p_remote_osm_port);
-            remote_lmc = osm_physp_get_lmc(p_remote_osm_port);
             break;
 
          case IB_NODE_TYPE_SWITCH:
@@ -2652,7 +2633,6 @@ __osm_ftree_fabric_construct_sw_ports(
 
             /* switch LID is only in port 0 port_info structure */
             remote_base_lid = osm_node_get_base_lid(p_remote_node, 0);
-            remote_lmc = osm_node_get_lmc(p_remote_node, 0);
 
             break;
 
@@ -2670,9 +2650,7 @@ __osm_ftree_fabric_construct_sw_ports(
             i,                                          /* local port number */          
             remote_port_num,                            /* remote port number */         
             p_sw->base_lid,                             /* local lid */                  
-            p_sw->lmc,                                  /* local lmc */                  
             remote_base_lid,                            /* remote lid */                 
-            remote_lmc,                                 /* remote lmc */                 
             osm_physp_get_port_guid(p_osm_port),        /* local port guid */            
             osm_physp_get_port_guid(p_remote_osm_port), /* remote port guid */           
             remote_node_guid,                           /* remote node guid */           
@@ -2804,6 +2782,15 @@ __osm_ftree_construct_fabric(
 
    OSM_LOG_ENTER(&p_ftree->p_osm->log, __osm_ftree_construct_fabric);
 
+   if (p_ftree->p_osm->subn.opt.lmc > 0)
+   {
+      osm_log(&p_ftree->p_osm->log, OSM_LOG_SYS,
+              "Subnet LMC > 0 not supported by fat-tree routing.\n"
+              "Falling back to default routing.\n");
+      status = -1;
+      goto Exit;
+   }
+
    if ( cl_qmap_count(&p_ftree->p_osm->subn.sw_guid_tbl) < 2 )
    {
       osm_log(&p_ftree->p_osm->log, OSM_LOG_SYS,
-- 
1.4.4.1.GIT





More information about the general mailing list