[ofa-general] [PATCH] osm: QoS - changing 'no_qos' option to 'qos'
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Tue Sep 11 06:01:29 PDT 2007
Changing OpenSM option "no_qos" with default
value 'TRUE 'to "qos" with deafult value 'FALSE'
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
opensm/include/opensm/osm_subnet.h | 4 ++--
opensm/opensm/main.c | 2 +-
opensm/opensm/osm_link_mgr.c | 2 +-
opensm/opensm/osm_prtn_config.c | 2 +-
opensm/opensm/osm_qos.c | 2 +-
opensm/opensm/osm_sa_multipath_record.c | 10 +++++-----
opensm/opensm/osm_sa_path_record.c | 10 +++++-----
opensm/opensm/osm_subnet.c | 14 +++++++-------
8 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index 7e1a3e7..dada8bf 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -257,7 +257,7 @@ typedef struct _osm_subn_opt {
unsigned long log_max_size;
char *partition_config_file;
boolean_t no_partition_enforcement;
- boolean_t no_qos;
+ boolean_t qos;
char *qos_policy_file;
boolean_t accum_log_file;
char *console;
@@ -400,7 +400,7 @@ typedef struct _osm_subn_opt {
* specified the log file will be truncated upon reaching
* this limit.
*
-* no_qos
+* qos
* Boolean that specifies whether the OpenSM QoS functionality
* should be off or on.
*
diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
index 08d654e..2d5e607 100644
--- a/opensm/opensm/main.c
+++ b/opensm/opensm/main.c
@@ -826,7 +826,7 @@ int main(int argc, char *argv[])
break;
case 'Q':
- opt.no_qos = FALSE;
+ opt.qos = TRUE;
break;
case 'Y':
diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c
index 5a6a81c..d5be7b5 100644
--- a/opensm/opensm/osm_link_mgr.c
+++ b/opensm/opensm/osm_link_mgr.c
@@ -352,7 +352,7 @@ __osm_link_mgr_set_physp_pi(IN osm_link_mgr_t * const p_mgr,
send_set = TRUE;
/* provide the vl_high_limit from the qos mgr */
- if (p_mgr->p_subn->opt.no_qos == FALSE &&
+ if (p_mgr->p_subn->opt.qos &&
p_physp->vl_high_limit != p_old_pi->vl_high_limit) {
send_set = TRUE;
p_pi->vl_high_limit = p_physp->vl_high_limit;
diff --git a/opensm/opensm/osm_prtn_config.c b/opensm/opensm/osm_prtn_config.c
index 9abf3e8..5034aa0 100644
--- a/opensm/opensm/osm_prtn_config.c
+++ b/opensm/opensm/osm_prtn_config.c
@@ -109,7 +109,7 @@ static int partition_create(unsigned lineno, struct part_conf *conf,
if (!conf->p_prtn)
return -1;
- if (conf->p_subn->opt.no_qos) {
+ if (!conf->p_subn->opt.qos) {
if (conf->sl != OSM_DEFAULT_SL) {
osm_log(conf->p_log, OSM_LOG_ERROR,
"partition_create: Overriding SL %d to default SL %d on partition %s as QoS not enabled\n",
diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c
index dff9996..c6641fc 100644
--- a/opensm/opensm/osm_qos.c
+++ b/opensm/opensm/osm_qos.c
@@ -280,7 +280,7 @@ osm_signal_t osm_qos_setup(osm_opensm_t * p_osm)
unsigned force_update;
uint8_t i;
- if (p_osm->subn.opt.no_qos)
+ if (!p_osm->subn.opt.qos)
return OSM_SIGNAL_DONE;
OSM_LOG_ENTER(&p_osm->log, osm_qos_setup);
diff --git a/opensm/opensm/osm_sa_multipath_record.c b/opensm/opensm/osm_sa_multipath_record.c
index 690f9e7..5c5155a 100644
--- a/opensm/opensm/osm_sa_multipath_record.c
+++ b/opensm/opensm/osm_sa_multipath_record.c
@@ -301,7 +301,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_mpr_rcv_t * const p_rcv,
}
}
- if (!p_rcv->p_subn->opt.no_qos) {
+ if (p_rcv->p_subn->opt.qos) {
/*
* Whether this node is switch or CA, the IN port for
@@ -427,7 +427,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_mpr_rcv_t * const p_rcv,
if (rate > ib_port_info_compute_rate(p_pi))
rate = ib_port_info_compute_rate(p_pi);
- if (!p_rcv->p_subn->opt.no_qos) {
+ if (p_rcv->p_subn->opt.qos) {
/*
* Check SL2VL table of the switch and update valid SLs
*/
@@ -470,7 +470,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_mpr_rcv_t * const p_rcv,
* Get QoS Level object according to the MultiPath request
* and adjust MultiPath parameters according to QoS settings
*/
- if ( !p_rcv->p_subn->opt.no_qos &&
+ if ( p_rcv->p_subn->opt.qos &&
p_rcv->p_subn->p_qos_policy &&
(p_qos_level = osm_qos_policy_get_qos_level_by_mpr(
p_rcv->p_subn->p_qos_policy, p_mpr,
@@ -791,7 +791,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_mpr_rcv_t * const p_rcv,
} else
required_sl = p_prtn->sl;
- } else if (!p_rcv->p_subn->opt.no_qos) {
+ } else if (p_rcv->p_subn->opt.qos) {
if (valid_sl_mask & (1 << OSM_DEFAULT_SL))
required_sl = OSM_DEFAULT_SL;
else {
@@ -804,7 +804,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_mpr_rcv_t * const p_rcv,
else
required_sl = OSM_DEFAULT_SL;
- if (!p_rcv->p_subn->opt.no_qos && !(valid_sl_mask & (1 << required_sl))) {
+ if (p_rcv->p_subn->opt.qos && !(valid_sl_mask & (1 << required_sl))) {
osm_log(p_rcv->p_log, OSM_LOG_ERROR,
"__osm_mpr_rcv_get_path_parms: ERR 451F: "
"Selected SL (%u) leads to VL15\n", required_sl);
diff --git a/opensm/opensm/osm_sa_path_record.c b/opensm/opensm/osm_sa_path_record.c
index c60fb6e..c8b3892 100644
--- a/opensm/opensm/osm_sa_path_record.c
+++ b/opensm/opensm/osm_sa_path_record.c
@@ -313,7 +313,7 @@ __osm_pr_rcv_get_path_parms(IN osm_pr_rcv_t * const p_rcv,
}
}
- if (!p_rcv->p_subn->opt.no_qos) {
+ if (p_rcv->p_subn->opt.qos) {
/*
* Whether this node is switch or CA, the IN port for
@@ -438,7 +438,7 @@ __osm_pr_rcv_get_path_parms(IN osm_pr_rcv_t * const p_rcv,
if (rate > ib_port_info_compute_rate(p_pi))
rate = ib_port_info_compute_rate(p_pi);
- if (!p_rcv->p_subn->opt.no_qos) {
+ if (p_rcv->p_subn->opt.qos) {
/*
* Check SL2VL table of the switch and update valid SLs
*/
@@ -481,7 +481,7 @@ __osm_pr_rcv_get_path_parms(IN osm_pr_rcv_t * const p_rcv,
* Get QoS Level object according to the path request
* and adjust path parameters according to QoS settings
*/
- if ( !p_rcv->p_subn->opt.no_qos &&
+ if ( p_rcv->p_subn->opt.qos &&
p_rcv->p_subn->p_qos_policy &&
(p_qos_level = osm_qos_policy_get_qos_level_by_pr(
p_rcv->p_subn->p_qos_policy, p_pr,
@@ -813,7 +813,7 @@ __osm_pr_rcv_get_path_parms(IN osm_pr_rcv_t * const p_rcv,
sl = OSM_DEFAULT_SL;
} else
sl = p_prtn->sl;
- } else if (!p_rcv->p_subn->opt.no_qos) {
+ } else if (p_rcv->p_subn->opt.qos) {
if (valid_sl_mask & (1 << OSM_DEFAULT_SL))
sl = OSM_DEFAULT_SL;
else {
@@ -826,7 +826,7 @@ __osm_pr_rcv_get_path_parms(IN osm_pr_rcv_t * const p_rcv,
else
sl = OSM_DEFAULT_SL;
- if (!p_rcv->p_subn->opt.no_qos && !(valid_sl_mask & (1 << sl))) {
+ if (p_rcv->p_subn->opt.qos && !(valid_sl_mask & (1 << sl))) {
osm_log(p_rcv->p_log, OSM_LOG_ERROR,
"__osm_pr_rcv_get_path_parms: ERR 1F24: "
"Selected SL (%u) leads to VL15\n", sl);
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 58803e1..3895732 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -454,7 +454,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt)
p_opt->log_max_size = 0;
p_opt->partition_config_file = OSM_DEFAULT_PARTITION_CONFIG_FILE;
p_opt->no_partition_enforcement = FALSE;
- p_opt->no_qos = TRUE;
+ p_opt->qos = FALSE;
p_opt->qos_policy_file = OSM_DEFAULT_QOS_POLICY_FILE;
p_opt->accum_log_file = TRUE;
p_opt->port_profile_switch_nodes = FALSE;
@@ -730,7 +730,7 @@ ib_api_status_t osm_subn_rescan_conf_files(IN osm_subn_t * const p_subn)
fclose(opts_file);
/* read QoS policy config file */
- if (!p_subn->opt.no_qos)
+ if (p_subn->opt.qos)
osm_qos_parse_policy_file(p_subn);
return IB_SUCCESS;
@@ -950,7 +950,7 @@ static void subn_verify_conf_file(IN osm_subn_opt_t * const p_opts)
p_opts->console = OSM_DEFAULT_CONSOLE;
}
- if (p_opts->no_qos == FALSE) {
+ if (p_opts->qos) {
subn_verify_max_vls(&(p_opts->qos_options.max_vls),
"qos_max_vls");
subn_verify_max_vls(&(p_opts->qos_ca_options.max_vls),
@@ -1184,7 +1184,7 @@ ib_api_status_t osm_subn_parse_conf_file(IN osm_subn_opt_t * const p_opts)
opts_unpack_boolean("no_partition_enforcement", p_key, p_val,
&p_opts->no_partition_enforcement);
- opts_unpack_boolean("no_qos", p_key, p_val, &p_opts->no_qos);
+ opts_unpack_boolean("qos", p_key, p_val, &p_opts->qos);
opts_unpack_charp("qos_policy_file",
p_key, p_val, &p_opts->qos_policy_file);
@@ -1551,11 +1551,11 @@ ib_api_status_t osm_subn_write_conf_file(IN osm_subn_opt_t * const p_opts)
fprintf(opts_file,
"#\n# QoS OPTIONS\n#\n"
- "# Disable QoS setup\n"
- "no_qos %s\n\n"
+ "# Enable QoS setup\n"
+ "qos %s\n\n"
"# QoS policy file to be used\n"
"qos_policy_file %s\n\n",
- p_opts->no_qos ? "TRUE" : "FALSE",
+ p_opts->qos ? "TRUE" : "FALSE",
p_opts->qos_policy_file);
subn_dump_qos_options(opts_file,
--
1.5.1.4
More information about the general
mailing list