Looks good, thanks. -- Yevgeny
Hal Rosenstock wrote: > OpenSM: Add option for force SDR link speed > > Add option to opensm.opts to force link speed. Currently, only forcing > to SDR link speed is supported. > > Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]> > > Index: include/opensm/osm_subnet.h > =================================================================== > --- include/opensm/osm_subnet.h (revision 10010) > +++ include/opensm/osm_subnet.h (working copy) > @@ -34,7 +34,6 @@ > * $Id$ > */ > > - > /* > * Abstract: > * Declaration of osm_subn_t. > @@ -238,9 +237,10 @@ typedef struct _osm_subn_opt > uint8_t sm_priority; > uint8_t lmc; > boolean_t lmc_esp0; > - uint8_t max_op_vls; > + uint8_t max_op_vls; > + uint8_t force_link_speed; > boolean_t reassign_lids; > - boolean_t reassign_lfts; > + boolean_t reassign_lfts; > boolean_t ignore_other_sm; > boolean_t single_thread; > boolean_t no_multicast_option; > Index: opensm/osm_subnet.c > =================================================================== > --- opensm/osm_subnet.c (revision 10018) > +++ opensm/osm_subnet.c (working copy) > @@ -452,6 +452,7 @@ osm_subn_set_default_opt( > p_opt->lmc = OSM_DEFAULT_LMC; > p_opt->lmc_esp0 = FALSE; > p_opt->max_op_vls = OSM_DEFAULT_MAX_OP_VLS; > + p_opt->force_link_speed = 0; > p_opt->reassign_lids = FALSE; > p_opt->reassign_lfts = TRUE; > p_opt->ignore_other_sm = FALSE; > @@ -840,6 +841,10 @@ osm_subn_parse_conf_file( > "max_op_vls", > p_key, p_val, &p_opts->max_op_vls); > > + __osm_subn_opts_unpack_uint8( > + "force_link_speed", > + p_key, p_val, &p_opts->force_link_speed); > + > __osm_subn_opts_unpack_boolean( > "reassign_lids", > p_key, p_val, &p_opts->reassign_lids); > @@ -1061,6 +1066,9 @@ osm_subn_write_conf_file( > "leaf_head_of_queue_lifetime 0x%02x\n\n" > "# Limit the maximal operational VLs\n" > "max_op_vls %u\n\n" > + "# Force switch links which are more than SDR capable to \n" > + "# operate at SDR speed\n\n" > + "force_link_speed %u\n\n" > "# The subnet_timeout code that will be set for all the ports\n" > "# The actual timeout is 4.096usec * 2^<subnet_timeout>\n" > "subnet_timeout %u\n\n" > @@ -1081,6 +1089,7 @@ osm_subn_write_conf_file( > p_opts->head_of_queue_lifetime, > p_opts->leaf_head_of_queue_lifetime, > p_opts->max_op_vls, > + p_opts->force_link_speed, > p_opts->subnet_timeout, > p_opts->local_phy_errors_threshold, > p_opts->overrun_errors_threshold > Index: opensm/osm_lid_mgr.c > =================================================================== > --- opensm/osm_lid_mgr.c (revision 10010) > +++ opensm/osm_lid_mgr.c (working copy) > @@ -1152,6 +1152,14 @@ __osm_lid_mgr_set_physp_pi( > sizeof(p_pi->link_width_enabled) )) > send_set = TRUE; > > + if ( p_mgr->p_subn->opt.force_link_speed ) > + ib_port_info_set_link_speed_enabled( p_pi, IB_LINK_SPEED_ACTIVE_2_5 ); > + else > + ib_port_info_set_link_speed_enabled( p_pi, > ib_port_info_get_link_speed_enabled(p_old_pi) ); > + if (memcmp( &p_pi->link_speed, &p_old_pi->link_speed, > + sizeof(p_pi->link_speed) )) > + send_set = TRUE; > + > /* M_KeyProtectBits are always zero */ > p_pi->mkey_lmc = p_mgr->p_subn->opt.lmc; > /* Check to see if the value we are setting is different than > Index: opensm/osm_link_mgr.c > =================================================================== > --- opensm/osm_link_mgr.c (revision 10010) > +++ opensm/osm_link_mgr.c (working copy) > @@ -310,6 +310,14 @@ __osm_link_mgr_set_physp_pi( > sizeof(p_pi->link_width_enabled) )) > send_set = TRUE; > > + if ( p_mgr->p_subn->opt.force_link_speed ) > + ib_port_info_set_link_speed_enabled( p_pi, IB_LINK_SPEED_ACTIVE_2_5 ); > + else > + ib_port_info_set_link_speed_enabled( p_pi, > ib_port_info_get_link_speed_enabled(p_old_pi) ); > + if (memcmp( &p_pi->link_speed, &p_old_pi->link_speed, > + sizeof(p_pi->link_speed) )) > + send_set = TRUE; > + > /* calc new op_vls and mtu */ > op_vls = > osm_physp_calc_link_op_vls( p_mgr->p_log, p_mgr->p_subn, p_physp ); > > > > > > _______________________________________________ > openib-general mailing list > [email protected] > http://openib.org/mailman/listinfo/openib-general > > To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general > _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
