>From ad98ef2f87c3616d7763e51ba12dbe6a59bc3811 Mon Sep 17 00:00:00 2001
From: Albert Chu <chu11@llnl.gov>
Date: Tue, 28 Oct 2008 19:33:11 -0700
Subject: [PATCH] remove max_vls config


Signed-off-by: Albert Chu <chu11@llnl.gov>
---
 opensm/doc/QoS_management_in_OpenSM.txt |    5 -----
 opensm/doc/qos-config.txt               |    3 ---
 opensm/include/opensm/osm_subnet.h      |    4 ----
 opensm/man/opensm.8.in                  |    3 ---
 opensm/opensm/osm_qos.c                 |    2 --
 opensm/opensm/osm_subnet.c              |   30 ------------------------------
 6 files changed, 0 insertions(+), 47 deletions(-)

diff --git a/opensm/doc/QoS_management_in_OpenSM.txt b/opensm/doc/QoS_management_in_OpenSM.txt
index ba1b4b1..64fe602 100644
--- a/opensm/doc/QoS_management_in_OpenSM.txt
+++ b/opensm/doc/QoS_management_in_OpenSM.txt
@@ -411,7 +411,6 @@ the qos-ulps section.
 OpenSM cached options file has a set of QoS related configuration parameters,
 that are used to configure SL2VL mapping and VL arbitration on IB ports.
 These parameters are:
- - Max VLs: the maximum number of VLs that will be on the subnet.
  - High limit: the limit of High Priority component of VL Arbitration
    table (IBA 7.6.9).
  - VLArb low table: Low priority VL Arbitration table (IBA 7.6.9) template.
@@ -432,13 +431,11 @@ of the currently supported sets:
 Here's the example of typical default values for CAs and switches' external
 ports (hard-coded in OpenSM initialization):
 
-    qos_ca_max_vls 15
     qos_ca_high_limit 0
     qos_ca_vlarb_high 0:4,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0
     qos_ca_vlarb_low 0:0,1:4,2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:4,11:4,12:4,13:4,14:4
     qos_ca_sl2vl 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,7
 
-    qos_swe_max_vls 15
     qos_swe_high_limit 0
     qos_swe_vlarb_high 0:4,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0
     qos_swe_vlarb_low 0:0,1:4,2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:4,11:4,12:4,13:4,14:4
@@ -473,13 +470,11 @@ values for each VL should be multiples of 64.
 
 Below is an example of SL2VL and VL Arbitration configuration on subnet:
 
-    qos_ca_max_vls 15
     qos_ca_high_limit 6
     qos_ca_vlarb_high 0:4
     qos_ca_vlarb_low 0:0,1:64,2:128,3:192,4:0,5:64,6:64,7:64
     qos_ca_sl2vl 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,7
 
-    qos_swe_max_vls 15
     qos_swe_high_limit 6
     qos_swe_vlarb_high 0:4
     qos_swe_vlarb_low 0:0,1:64,2:128,3:192,4:0,5:64,6:64,7:64
diff --git a/opensm/doc/qos-config.txt b/opensm/doc/qos-config.txt
index ac7312f..3ad44aa 100644
--- a/opensm/doc/qos-config.txt
+++ b/opensm/doc/qos-config.txt
@@ -5,7 +5,6 @@ Basically there is a set of QoS related low-level configuration parameters.
 All these parameter names are prefixed by "qos_" string. Here is a full
 list of these parameters:
 
-  qos_max_vls    - The maximum number of VLs that will be on the subnet
   qos_high_limit - The limit of High Priority component of VL Arbitration
                    table (IBA 7.6.9)
   qos_vlarb_low  - Low priority VL Arbitration table (IBA 7.6.9) template
@@ -17,7 +16,6 @@ list of these parameters:
 
 Typical default values (hard-coded in OpenSM initialization) are:
 
-  qos_max_vls 15
   qos_high_limit 0
   qos_vlarb_low 0:0,1:4,2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:4,11:4,12:4,13:4,14:4
   qos_vlarb_high 0:4,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0
@@ -39,6 +37,5 @@ string. Here is a full list of the currently supported sets:
 
 Examples:
 
-  qos_sw0_max_vls 2
   qos_ca_sl2vl 0,1,2,3,5,5,5,12,12,0,
   qos_swe_high_limit 0
diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index 7259587..7ef2963 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -98,7 +98,6 @@ struct osm_qos_policy;
 * SYNOPSIS
 */
 typedef struct osm_qos_options {
-	unsigned max_vls;
 	unsigned high_limit;
 	char *vlarb_high;
 	char *vlarb_low;
@@ -107,9 +106,6 @@ typedef struct osm_qos_options {
 /*
 * FIELDS
 *
-*	max_vls
-*		The number of maximum VLs on the Subnet
-*
 *	high_limit
 *		The limit of High Priority component of VL Arbitration
 *		table (IBA 7.6.9)
diff --git a/opensm/man/opensm.8.in b/opensm/man/opensm.8.in
index b64daba..b6f8f69 100644
--- a/opensm/man/opensm.8.in
+++ b/opensm/man/opensm.8.in
@@ -473,7 +473,6 @@ There are a set of QoS related low-level configuration parameters.
 All these parameter names are prefixed by "qos_" string. Here is a full
 list of these parameters:
 
- qos_max_vls    - The maximum number of VLs that will be on the subnet
  qos_high_limit - The limit of High Priority component of VL
                   Arbitration table (IBA 7.6.9)
  qos_vlarb_low  - Low priority VL Arbitration table (IBA 7.6.9)
@@ -488,7 +487,6 @@ list of these parameters:
 
 Typical default values (hard-coded in OpenSM initialization) are:
 
- qos_max_vls 15
  qos_high_limit 0
  qos_vlarb_low 0:0,1:4,2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:4,11:4,12:4,13:4,14:4
  qos_vlarb_high 0:4,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0
@@ -509,7 +507,6 @@ string. Here is a full list of the currently supported sets:
  qos_swe_ - parameters set for switches' external ports.
 
 Examples:
- qos_sw0_max_vls=2
  qos_ca_sl2vl=0,1,2,3,5,5,5,12,12,0,
  qos_swe_high_limit=0
 
diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c
index 1679ae0..988b930 100644
--- a/opensm/opensm/osm_qos.c
+++ b/opensm/opensm/osm_qos.c
@@ -51,7 +51,6 @@
 #include <opensm/osm_qos_policy.h>
 
 struct qos_config {
-	uint8_t max_vls;
 	uint8_t vl_high_limit;
 	ib_vl_arb_table_t vlarb_high[2];
 	ib_vl_arb_table_t vlarb_low[2];
@@ -381,7 +380,6 @@ static void qos_build_config(struct qos_config *cfg,
 
 	memset(cfg, 0, sizeof(*cfg));
 
-	cfg->max_vls = opt->max_vls > 0 ? opt->max_vls : dflt->max_vls;
 	cfg->vl_high_limit = (uint8_t) opt->high_limit;
 
 	p = opt->vlarb_high ? opt->vlarb_high : dflt->vlarb_high;
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 0422d0f..9d91e9f 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -363,7 +363,6 @@ osm_port_t *osm_get_port_by_guid(IN osm_subn_t const *p_subn, IN ib_net64_t guid
  **********************************************************************/
 static void subn_set_default_qos_options(IN osm_qos_options_t * opt)
 {
-	opt->max_vls = OSM_DEFAULT_QOS_MAX_VLS;
 	opt->high_limit = OSM_DEFAULT_QOS_HIGH_LIMIT;
 	opt->vlarb_high = OSM_DEFAULT_QOS_VLARB_HIGH;
 	opt->vlarb_low = OSM_DEFAULT_QOS_VLARB_LOW;
@@ -638,8 +637,6 @@ subn_parse_qos_options(IN const char *prefix,
 {
 	char name[256];
 
-	snprintf(name, sizeof(name), "%s_max_vls", prefix);
-	opts_unpack_uint32(name, p_key, p_val_str, &opt->max_vls);
 	snprintf(name, sizeof(name), "%s_high_limit", prefix);
 	opts_unpack_uint32(name, p_key, p_val_str, &opt->high_limit);
 	snprintf(name, sizeof(name), "%s_vlarb_high", prefix);
@@ -656,13 +653,11 @@ subn_dump_qos_options(FILE * file,
 		      const char *prefix, osm_qos_options_t * opt)
 {
 	return fprintf(file, "# %s\n"
-		       "%s_max_vls %u\n"
 		       "%s_high_limit %u\n"
 		       "%s_vlarb_high %s\n"
 		       "%s_vlarb_low %s\n"
 		       "%s_sl2vl %s\n",
 		       set_name,
-		       prefix, opt->max_vls,
 		       prefix, opt->high_limit,
 		       prefix, opt->vlarb_high,
 		       prefix, opt->vlarb_low, prefix, opt->sl2vl);
@@ -833,20 +828,6 @@ int osm_subn_rescan_conf_files(IN osm_subn_t * const p_subn)
 /**********************************************************************
  **********************************************************************/
 
-static void subn_verify_max_vls(IN unsigned *max_vls, IN char *key)
-{
-	char buff[128];
-
-	if (*max_vls > 15) {
-		sprintf(buff, " Invalid Cached Option:%s=%u:"
-			"Using Default:%u\n",
-			key, *max_vls, OSM_DEFAULT_QOS_MAX_VLS);
-		printf(buff);
-		cl_log_event("OpenSM", CL_LOG_INFO, buff, NULL, 0);
-		*max_vls = OSM_DEFAULT_QOS_MAX_VLS;
-	}
-}
-
 static void subn_verify_high_limit(IN unsigned *high_limit, IN char *key)
 {
 	char buff[128];
@@ -1046,17 +1027,6 @@ static void subn_verify_conf_file(IN osm_subn_opt_t * const p_opts)
 	}
 
 	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),
-				    "qos_ca_max_vls");
-		subn_verify_max_vls(&(p_opts->qos_sw0_options.max_vls),
-				    "qos_sw0_max_vls");
-		subn_verify_max_vls(&(p_opts->qos_swe_options.max_vls),
-				    "qos_swe_max_vls");
-		subn_verify_max_vls(&(p_opts->qos_rtr_options.max_vls),
-				    "qos_rtr_max_vls");
-
 		subn_verify_high_limit(&(p_opts->qos_options.high_limit),
 				       "qos_high_limit");
 		subn_verify_high_limit(&(p_opts->qos_ca_options.high_limit),
-- 
1.5.4.5

