osm_lid_mgr.c: Don't configure MTU and LMC for base SP0
PATCH 1/1 osm_lid_mgr.c: Don't configure MTU and LMC for base SP0
From: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/[email protected]>
For base switch port 0, these values aren't defined/used.
--- opensm/osm_lid_mgr.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
opensm/osm_lid_mgr.c +6 -5
@@ -988,10 +988,11 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr, ib_port_info_get_port_state(p_old_pi)) send_set = TRUE; } - }else { + }else if (ib_switch_info_is_enhanced_port0 (&p_node->sw->switch_info)) {/* -For Port 0, NeighborMTU is relevant only for Enh. SP0. -In this case, we'll set the MTU according to the mtu_cap +* Configure Enh. SP0: +* Set MTU according to the mtu_cap. +* Set LMC if lmc_esp0 is defined. */ ib_port_info_set_neighbor_mtu (p_pi, ib_port_info_get_mtu_cap
@@ -1006,8 +1007,8 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr,cl_ntoh64 (osm_physp_get_port_guid (p_physp)), ib_port_info_get_neighbor_mtu(p_pi)); -/* Determine if enhanced switch port 0 and if so set LMC */ -if (osm_switch_sp0_is_lmc_capable (p_node->sw, p_mgr->p_subn)) { +/* Configure LMC on enhanced SP0 */ +if (p_mgr->p_subn->opt.lmc_esp0) {/* p_pi->mkey_lmc is initialized earlier */ ib_port_info_set_lmc (p_pi, p_mgr->p_subn->opt.lmc); if (ib_port_info_get_lmc(p_pi) !=
Signature · 6 lines
1.7.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html