[openib-general] [PATCH] opensm: QoS configuration parameters for routers

Sasha Khapyorsky sashak at voltaire.com
Mon May 15 13:09:47 PDT 2006


This defines QoS configuration parameters set for routers.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---

 osm/include/opensm/osm_subnet.h |    4 ++++
 osm/opensm/osm_qos.c            |    6 +++++-
 osm/opensm/osm_subnet.c         |   10 ++++++++++
 3 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/osm/include/opensm/osm_subnet.h b/osm/include/opensm/osm_subnet.h
index 33ab3f5..319c494 100644
--- a/osm/include/opensm/osm_subnet.h
+++ b/osm/include/opensm/osm_subnet.h
@@ -284,6 +284,7 @@ typedef struct _osm_subn_opt
   osm_qos_options_t        qos_hca_options;
   osm_qos_options_t        qos_sw0_options;
   osm_qos_options_t        qos_swe_options;
+  osm_qos_options_t        qos_rtr_options;
 } osm_subn_opt_t;
 /*
 * FIELDS
@@ -448,6 +449,9 @@ typedef struct _osm_subn_opt
 *  qos_swe_options
 *     QoS options for switches' external ports
 *
+*  qos_rtr_options
+*     QoS options for router ports
+*
 * SEE ALSO
 *	Subnet object
 *********/
diff --git a/osm/opensm/osm_qos.c b/osm/opensm/osm_qos.c
index ade601c..fbd7773 100644
--- a/osm/opensm/osm_qos.c
+++ b/osm/opensm/osm_qos.c
@@ -309,7 +309,7 @@ static ib_api_status_t qos_physp_setup(o
 
 osm_signal_t osm_qos_setup(osm_opensm_t * p_osm)
 {
-	struct qos_config hca_config, sw0_config, swe_config;
+	struct qos_config hca_config, sw0_config, swe_config, rtr_config;
 	struct qos_config *cfg;
 	osm_switch_t *p_sw;
 	ib_switch_info_t *p_si;
@@ -333,6 +333,8 @@ osm_signal_t osm_qos_setup(osm_opensm_t 
 			 &p_osm->subn.opt.qos_options);
 	qos_build_config(&swe_config, &p_osm->subn.opt.qos_swe_options,
 			 &p_osm->subn.opt.qos_options);
+	qos_build_config(&rtr_config, &p_osm->subn.opt.qos_rtr_options,
+			 &p_osm->subn.opt.qos_options);
 
 	cl_plock_excl_acquire(&p_osm->lock);
 
@@ -362,6 +364,8 @@ osm_signal_t osm_qos_setup(osm_opensm_t 
 
 			cfg = &sw0_config;
 		}
+		else if (node_type == IB_NODE_TYPE_ROUTER)
+			cfg = &rtr_config;
 		else
 			cfg = &hca_config;
 
diff --git a/osm/opensm/osm_subnet.c b/osm/opensm/osm_subnet.c
index ab5d88e..48f0305 100644
--- a/osm/opensm/osm_subnet.c
+++ b/osm/opensm/osm_subnet.c
@@ -475,6 +475,7 @@ osm_subn_set_default_opt(
   subn_set_default_qos_options(&p_opt->qos_hca_options);
   subn_set_default_qos_options(&p_opt->qos_sw0_options);
   subn_set_default_qos_options(&p_opt->qos_swe_options);
+  subn_set_default_qos_options(&p_opt->qos_rtr_options);
 }
 
 /**********************************************************************
@@ -722,6 +723,9 @@ osm_subn_rescan_conf_file(
       subn_parse_qos_options("qos_swe",
         p_key, p_val, &p_opts->qos_swe_options);
 
+      subn_parse_qos_options("qos_rtr",
+        p_key, p_val, &p_opts->qos_rtr_options);
+
     }
   }
   fclose(opts_file);
@@ -928,6 +932,9 @@ osm_subn_parse_conf_file(
       subn_parse_qos_options("qos_swe",
         p_key, p_val, &p_opts->qos_swe_options);
 
+      subn_parse_qos_options("qos_rtr",
+        p_key, p_val, &p_opts->qos_rtr_options);
+
     }
   }
   fclose(opts_file);
@@ -1141,6 +1148,9 @@ osm_subn_write_conf_file(
   fprintf(opts_file, "\n");
   subn_dump_qos_options(opts_file,
     "QoS Switch external ports options", "qos_swe", &p_opts->qos_swe_options);
+  fprintf(opts_file, "\n");
+  subn_dump_qos_options(opts_file,
+    "QoS router ports options", "qos_rtr", &p_opts->qos_rtr_options);
 
   /* optional string attributes ... */
   



More information about the general mailing list