[ofa-general] [PATCH] osm_port.c: do not force max_op_vls = 0 to 1

Doron Shoham dorons at voltaire.com
Thu May 7 00:39:36 PDT 2009


when setting max_op_vls = 0
do not force it to 1.
0 is valid value which means "No change"

Signed-off-by: Doron Shoham <dorons at voltaire.com>
---
 opensm/opensm/osm_port.c   |    4 ++--
 opensm/opensm/osm_subnet.c |    8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
index 2e6c642..3679f29 100644
--- a/opensm/opensm/osm_port.c
+++ b/opensm/opensm/osm_port.c
@@ -379,8 +379,8 @@ uint8_t osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
 	/* support user limitation of max_op_vls */
 	if (op_vls > p_subn->opt.max_op_vls)
 		op_vls = p_subn->opt.max_op_vls;
-
-	if (op_vls == 0) {
+	else if (op_vls == 0) {
+		/* for non compliant implementations */
 		OSM_LOG(p_log, OSM_LOG_DEBUG, "ERR 4102: "
 			"Invalid OP_VLS = 0. Forcing correction to 1 (VL0)\n");
 		op_vls = 1;
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index ec15f8a..71fc7a0 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -1288,6 +1288,14 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t *const p_opts)
 		"# switch port connected to a CA or router port\n"
 		"leaf_head_of_queue_lifetime 0x%02x\n\n"
 		"# Limit the maximal operational VLs\n"
+		"# Virtual Lanes operational on this port\n"
+		"# Values are (IB Spec 1.2.1, 14.2.5.6 Table 146 \"PortInfo\")\n"
+		"#    0: No change; valid only on Set()\n"
+		"#    1: VL0\n"
+		"#    2: VL0, VL1\n"
+		"#    3: VL0 - VL3\n"
+		"#    4: VL0 - VL7\n"
+		"#    5: VL0 - VL14\n"
 		"max_op_vls %u\n\n"
 		"# Force PortInfo:LinkSpeedEnabled on switch ports\n"
 		"# If 0, don't modify PortInfo:LinkSpeedEnabled on switch port\n"
-- 
1.5.4





More information about the general mailing list