opensm: fix logging messages about op_vls and mtu mismatch
PATCH 1/1 opensm: fix logging messages about op_vls and mtu mismatch
These log messages should be issued only if current operational vl/neighbor mtu are different from calculated operational vl/neighbor mtu.
--- include/opensm/osm_port.h | 12 +++++++++- opensm/osm_lid_mgr.c | 6 +++- opensm/osm_link_mgr.c | 6 +++- opensm/osm_port.c | 50 +++++++++++++++++++++++--------------------- 4 files changed, 44 insertions(+), 30 deletions(-)
include/opensm/osm_port.h +10 -2
@@ -1377,7 +1377,8 @@ void osm_port_get_lid_range_ho(IN const osm_port_t * p_port,* SYNOPSIS */ uint8_t osm_physp_calc_link_mtu(IN osm_log_t * p_log, - IN const osm_physp_t * p_physp); + IN const osm_physp_t * p_physp, + IN uint8_t current_mtu);/* * PARAMETERS * p_log
@@ -1386,6 +1387,9 @@ uint8_t osm_physp_calc_link_mtu(IN osm_log_t * p_log,* p_physp * [in] Pointer to an osm_physp_t object. * +* current_mtu +* [in] Current neighbor mtu on this port +* * RETURN VALUES * The MTU of the link to be used. *
@@ -1407,7 +1411,8 @@ uint8_t osm_physp_calc_link_mtu(IN osm_log_t * p_log,*/ uint8_t osm_physp_calc_link_op_vls(IN osm_log_t * p_log, IN const osm_subn_t * p_subn, - IN const osm_physp_t * p_physp); + IN const osm_physp_t * p_physp, + IN uint8_t current_op_vls);/* * PARAMETERS * p_log
@@ -1419,6 +1424,9 @@ uint8_t osm_physp_calc_link_op_vls(IN osm_log_t * p_log,* p_physp * [in] Pointer to an osm_physp_t object. * +* current_op_vls +* [in] Current operational VL on the port +* * RETURN VALUES * The OP_VLS of the link to be used. *
opensm/osm_lid_mgr.c +4 -2
@@ -915,8 +915,10 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr,/* calc new op_vls and mtu */ op_vls =osm_physp_calc_link_op_vls (p_mgr->p_log, p_mgr->p_subn, - p_physp); - mtu =osm_physp_calc_link_mtu (p_mgr->p_log, p_physp); + p_physp, +ib_port_info_get_op_vls (p_old_pi)); + mtu =osm_physp_calc_link_mtu (p_mgr->p_log, p_physp, +ib_port_info_get_neighbor_mtu (p_old_pi));ib_port_info_set_neighbor_mtu (p_pi, mtu);
opensm/osm_link_mgr.c +4 -2
@@ -402,8 +402,10 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp,/* calc new op_vls and mtu */ op_vls = -osm_physp_calc_link_op_vls (sm->p_log, sm->p_subn, p_physp); - mtu =osm_physp_calc_link_mtu (sm->p_log, p_physp); +osm_physp_calc_link_op_vls (sm->p_log, sm->p_subn, p_physp, +ib_port_info_get_op_vls (p_old_pi)); + mtu =osm_physp_calc_link_mtu (sm->p_log, p_physp, +ib_port_info_get_neighbor_mtu (p_old_pi));ib_port_info_set_neighbor_mtu (p_pi, mtu); if (ib_port_info_get_neighbor_mtu(p_pi) !=
opensm/osm_port.c +26 -24
74 lines not on this page · raw message
Signature · 6 lines
1.7.7.6 -- 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