Hi again Eitan,<br><br><div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Eitan Zahavi</b> <<a href="mailto:eitan@mellanox.co.il">eitan@mellanox.co.il</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Sasha<br><br>When QoS setup is done the code was trying to send updates of<br>vl_arb_high_limit by req_set of PORT_INFO with the new data.<br>However, at that stage the SM still did not assign LIDs to the ports.<br>So the sent
PortInfo.base_lid was still zero. The specification does not<br>allow for such LIDs (they are considered ilegal).</blockquote><div><br>
Doesn't that really depend on the PortState ? The LID (and SMLID) needs to be set by ARMED/ACTIVE.<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">the patch below fixes this by storing the calculated value and later<br>using it in link and lid managers.
</blockquote><div><br>
It's probably better to defer the setting as this patch appears to do.<br>
<br>
-- Hal<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Eitan<br><br>Signed-off-by: Eitan Zahavi <<a href="mailto:eitan@mellanox.co.il">
eitan@mellanox.co.il</a>><br><br>diff --git a/opensm/include/opensm/osm_port.h b/opensm/include/opensm/osm_port.h<br>index 54ebcfc..5032b1b 100644<br>--- a/opensm/include/opensm/osm_port.h<br>+++ b/opensm/include/opensm/osm_port.h
<br>@@ -117,6 +117,7 @@ typedef struct _osm_physp<br> struct _osm_node *p_node;<br> struct _osm_physp *p_remote_physp;<br>
boolean_t healthy;<br>+ uint8_t vl_high_limit;<br>
osm_dr_path_t
dr_path;<br>
osm_pkey_tbl_t
pkeys;<br> ib_vl_arb_table_t vl_arb[4];<br>diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c<br>index bc3f8b3..ed76382 100644<br>--- a/opensm/opensm/osm_lid_mgr.c<br>+++ b/opensm/opensm/osm_lid_mgr.c
<br>@@ -1182,6 +1182,14 @@ __osm_lid_mgr_set_physp_pi(<br> ib_port_info_get_port_state(p_old_pi) )<br> send_set = TRUE;<br> }<br>+<br>+ /* provide the vl_high_limit from the qos mgr */<br>+ if (p_mgr->p_subn->
opt.no_qos == FALSE)<br>+ if
(p_physp->vl_high_limit != p_old_pi->vl_high_limit)<br>+ {<br>+ send_set
= TRUE;<br>+ p_pi->vl_high_limit
= p_physp->vl_high_limit;<br>+ }<br> }<br> else<br> {<br>diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c<br>index 25f0fc3..3781fd2 100644<br>--- a/opensm/opensm/osm_link_mgr.c
<br>+++ b/opensm/opensm/osm_link_mgr.c<br>@@ -354,6 +354,15 @@ __osm_link_mgr_set_physp_pi(<br> context.pi_context.active_transition = FALSE;<br> }<br><br>+ /* provide the vl_high_limit from the qos mgr */<br>+ if (p_mgr->p_subn->
opt.no_qos == FALSE)<br>+ if (p_physp->vl_high_limit != p_old_pi->vl_high_limit)<br>+ {<br>+ send_set = TRUE;<br>+
p_pi->vl_high_limit = p_physp->vl_high_limit;<br>+ }<br>+<br>+<br> context.pi_context.node_guid = osm_node_get_node_guid( p_node );<br> context.pi_context.port_guid = osm_physp_get_port_guid( p_physp );
<br> context.pi_context.set_method = TRUE;<br>diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c<br>index bbb1608..413e200 100644<br>--- a/opensm/opensm/osm_qos.c<br>+++ b/opensm/opensm/osm_qos.c<br>@@ -216,42 +216,6 @@ static ib_api_status_t sl2vl_update(osm_req_t * p_req, osm_port_t * p_port,
<br> return IB_SUCCESS;<br> }<br><br>-static ib_api_status_t vl_high_limit_update(osm_req_t * p_req,<br>-
osm_physp_t * p,<br>-
const struct qos_config *qcfg)<br>-{<br>- uint8_t payload[IB_SMP_DATA_SIZE];<br>- osm_madw_context_t context;<br>- ib_port_info_t *p_pi;<br>-<br>- p_pi = &p->port_info;<br>-<br>- if (p_pi->vl_high_limit == qcfg->vl_high_limit)
<br>- return IB_SUCCESS;<br>-<br>- memset(payload, 0, IB_SMP_DATA_SIZE);<br>- memcpy(payload, p_pi, sizeof(ib_port_info_t));<br>-<br>- p_pi = (ib_port_info_t *) payload;<br>- ib_port_info_set_state_no_change(p_pi);
<br>-<br>- p_pi->vl_high_limit = qcfg->vl_high_limit;<br>-<br>- context.pi_context.node_guid =<br>- osm_node_get_node_guid(osm_physp_get_node_ptr(p));<br>- context.pi_context.port_guid = osm_physp_get_port_guid(p);
<br>- context.pi_context.set_method = TRUE;<br>- context.pi_context.update_master_sm_base_lid = FALSE;<br>- context.pi_context.ignore_errors = FALSE;<br>- context.pi_context.light_sweep = FALSE;<br>
- context.pi_context.active_transition = FALSE;<br>-<br>- return osm_req_set(p_req, osm_physp_get_dr_path_ptr(p),<br>- payload,
sizeof(payload), IB_MAD_ATTR_PORT_INFO,<br>- cl_hton32(osm_physp_get_port_num(p)),<br>- CL_DISP_MSGID_NONE,
&context);<br>-}<br>-<br> static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_req_t * p_req,<br>
osm_port_t * p_port, osm_physp_t * p,<br>
uint8_t port_num,<br>@@ -261,16 +225,8 @@ static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_req_t * p_req,<br><br> /* OpVLs should be ok at this moment - just use it */<br><br>- /* setup VL high limit */
<br>- status = vl_high_limit_update(p_req, p, qcfg);<br>- if (status != IB_SUCCESS) {<br>- osm_log(p_log, OSM_LOG_ERROR,<br>-
"qos_physp_setup: ERR 6201 : "<br>-
"failed to update VLHighLimit "<br>-
"for port %" PRIx64 " #%d\n",<br>-
cl_ntoh64(p->port_guid), port_num);<br>- return status;<br>- }<br>+ /* setup VL high limit on the physp later to be updated by lid/link mgrs */<br>+ p->vl_high_limit = qcfg->vl_high_limit;
<br><br> /* setup VLArbitration */<br> status = vlarb_update(p_req, p, port_num, qcfg);<br><br></blockquote></div><br>