[openib-general] [PATCH] opensm: use LMC value with ESP0 only when not disabled by user

Sasha Khapyorsky sashak at voltaire.com
Mon Nov 20 15:42:24 PST 2006


The problem is that some buggy Enhanced SP0 is not supports LMC setting,
to workaround this subnet opt->lmc_esp0 was used. In most of cases it is
handled properly, but LID manager still allocate 2^^LMC lids for this
port, as result we have invalid entries in switches' forwarding tables.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 osm/opensm/osm_lid_mgr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/osm/opensm/osm_lid_mgr.c b/osm/opensm/osm_lid_mgr.c
index ba5f120..e9bc295 100644
--- a/osm/opensm/osm_lid_mgr.c
+++ b/osm/opensm/osm_lid_mgr.c
@@ -856,7 +856,7 @@ __osm_lid_mgr_get_port_lid(
     /* Determine if base switch port 0 */
     p_sw = osm_get_switch_by_guid(p_mgr->p_subn,
                                   osm_node_get_node_guid(osm_port_get_parent_node(p_port)));
-    if (!osm_switch_is_sp0_enhanced(p_sw))
+    if (!p_mgr->p_subn->opt.lmc_esp0 || !osm_switch_is_sp0_enhanced(p_sw))
     {
       num_lids = 1;
     }
@@ -1242,7 +1242,7 @@ __osm_lid_mgr_set_physp_pi(
 
     /* Determine if enhanced switch port 0 and if so set LMC */
     p_sw = osm_get_switch_by_guid( p_mgr->p_subn, p_node->node_info.node_guid );
-    if (osm_switch_is_sp0_enhanced(p_sw))
+    if (p_mgr->p_subn->opt.lmc_esp0 && osm_switch_is_sp0_enhanced(p_sw))
     {
       /* M_KeyProtectBits are always zero */
       p_pi->mkey_lmc = p_mgr->p_subn->opt.lmc;
-- 
1.4.4.g031c-dirty





More information about the general mailing list