[IPoIB]: Fill in service level in MAC_TO_PATH output.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 14 Dec 2008 02:47:22 +0000 (02:47 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 14 Dec 2008 02:47:22 +0000 (02:47 +0000)
signed off by: Fab Tillier [ftillier@windows.microsoft.com]

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1788 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_mad.c
ulp/ipoib/kernel/ipoib_port.c

index 77641f3..5d52cfc 100644 (file)
@@ -1542,6 +1542,16 @@ __create_send_av(
 \r
        p_mad_element = h_send->p_send_mad;\r
 \r
+       AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_MAD_SVC,\r
+               ("class %d attr %d AV attr: port num %d, sl %d, dlid %d, path bits %d",\r
+               p_mad_element->p_mad_buf->mgmt_class,\r
+               p_mad_element->p_mad_buf->attr_id,\r
+               h_mad_svc->port_num,\r
+               p_mad_element->remote_sl,\r
+               p_mad_element->remote_lid,\r
+               p_mad_element->path_bits)\r
+               );\r
+\r
        av_attr.port_num = h_mad_svc->port_num;\r
 \r
        av_attr.sl = p_mad_element->remote_sl;\r
@@ -1549,7 +1559,18 @@ __create_send_av(
 \r
        av_attr.grh_valid = p_mad_element->grh_valid;\r
        if( av_attr.grh_valid )\r
+       {\r
                av_attr.grh = *p_mad_element->p_grh;\r
+               AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_MAD_SVC,\r
+                       ("ver_class_flow %08x, hop lmt %d, src gid %16I64x%16I64x, dest gid %16I64x%16I64x",\r
+                       av_attr.grh.ver_class_flow,\r
+                       av_attr.grh.hop_limit,\r
+                       cl_ntoh64( av_attr.grh.src_gid.unicast.prefix ),\r
+                       cl_ntoh64( av_attr.grh.src_gid.unicast.interface_id ),\r
+                       cl_ntoh64( av_attr.grh.dest_gid.unicast.prefix ),\r
+                       cl_ntoh64( av_attr.grh.dest_gid.unicast.interface_id ))\r
+                       );\r
+       }\r
 \r
        av_attr.static_rate = IB_PATH_RECORD_RATE_10_GBS;\r
        av_attr.path_bits = p_mad_element->path_bits;\r
index 21031b1..3e075cc 100644 (file)
@@ -4752,6 +4752,7 @@ ipoib_mac_to_path(
        uint8_t                 sl;\r
        net32_t                 flow_lbl;\r
        uint8_t                 hop_limit;\r
+       uint8_t                 pkt_life;\r
 \r
        IPOIB_ENTER( IPOIB_DBG_ENDPT );\r
 \r
@@ -4798,20 +4799,29 @@ ipoib_mac_to_path(
                &flow_lbl,\r
                &hop_limit\r
                );\r
-       ib_path_rec_set_hop_flow_raw( p_path, hop_limit, flow_lbl, FALSE );\r
 \r
-       p_path->tclass = p_port->ib_mgr.bcast_rec.tclass;\r
-       p_path->num_path = 1;\r
-       p_path->pkey = p_port->ib_mgr.bcast_rec.pkey;\r
-       p_path->mtu = p_port->ib_mgr.bcast_rec.mtu;\r
-       p_path->rate = p_port->ib_mgr.bcast_rec.rate;\r
        if( p_path->slid == p_path->dlid )\r
-               p_path->pkt_life = 0;\r
+               pkt_life = 0;\r
        else\r
-               p_path->pkt_life = p_port->ib_mgr.bcast_rec.pkt_life;\r
-       p_path->preference = 0;\r
-       p_path->resv1 = 0;\r
-       p_path->resv2 = 0;\r
+               pkt_life = p_port->ib_mgr.bcast_rec.pkt_life;\r
+\r
+       ib_path_rec_init_local(\r
+               p_path,\r
+               &p_endpt->dgid,\r
+               &p_port->p_local_endpt->dgid,\r
+               p_endpt->dlid,\r
+               p_port->p_local_endpt->dlid,\r
+               1,\r
+               p_port->ib_mgr.bcast_rec.pkey,\r
+               sl,\r
+               IB_PATH_SELECTOR_EXACTLY, p_port->ib_mgr.bcast_rec.mtu,\r
+               IB_PATH_SELECTOR_EXACTLY, p_port->ib_mgr.bcast_rec.rate,\r
+               IB_PATH_SELECTOR_EXACTLY, pkt_life,\r
+               0 );\r
+\r
+       /* Set global routing information. */\r
+       ib_path_rec_set_hop_flow_raw( p_path, hop_limit, flow_lbl, FALSE );\r
+       p_path->tclass = p_port->ib_mgr.bcast_rec.tclass;\r
 \r
        cl_obj_unlock( &p_port->obj );\r
 \r