[IPOIB] - clear the endpt lid_list on SM change event
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 11 Jul 2006 07:27:40 +0000 (07:27 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 11 Jul 2006 07:27:40 +0000 (07:27 +0000)
- add ASSERT for duplication in the endpt lid_list
- not update the endpt lid from the WC , but wait to the path_query

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

ulp/ipoib/kernel/ipoib_endpoint.c
ulp/ipoib/kernel/ipoib_port.c

index c75ac2d..4ef32db 100644 (file)
@@ -413,6 +413,8 @@ __path_query_cb(
        \r
        if( !p_endpt->dlid )\r
        {\r
+               cl_map_item_t   *p_qitem;\r
+\r
                /* This is a subnet local endpoint that does not have its LID set. */\r
                p_endpt->dlid = p_path->dlid;\r
                /*\r
@@ -420,8 +422,9 @@ __path_query_cb(
                 * traffic will resolve it properly.\r
                 */\r
                cl_obj_lock( &p_port->obj );\r
-               cl_qmap_insert( &p_port->endpt_mgr.lid_endpts,\r
+               p_qitem = cl_qmap_insert( &p_port->endpt_mgr.lid_endpts,\r
                        p_endpt->dlid, &p_endpt->lid_item );\r
+               CL_ASSERT( p_qitem == &p_endpt->lid_item );\r
                cl_obj_unlock( &p_port->obj );\r
        }\r
        av_attr.static_rate = ib_path_rec_rate( p_path );\r
index 75f881f..3eca133 100644 (file)
@@ -1711,7 +1711,7 @@ __recv_get_endpts(
 #else  /* IPOIB_INLINE_RECV */\r
                        *pp_src = ipoib_endpt_create( &p_desc->p_buf->ib.grh.src_gid,\r
 #endif /* IPOIB_INLINE_RECV */\r
-                               p_wc->recv.ud.remote_lid, p_wc->recv.ud.remote_qp );\r
+                               0, p_wc->recv.ud.remote_qp );\r
                        if( !*pp_src )\r
                        {\r
                                IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
@@ -3994,11 +3994,7 @@ __endpt_mgr_reset_all(
                                &p_endpt->mac_item );\r
                        cl_fmap_remove_item( &p_port->endpt_mgr.gid_endpts,\r
                                &p_endpt->gid_item );\r
-                       if( p_endpt->dlid )\r
-                       {\r
-                               cl_qmap_remove_item( &p_port->endpt_mgr.lid_endpts,\r
-                                       &p_endpt->lid_item );\r
-                       }\r
+\r
                        cl_qlist_insert_tail(\r
                                &mc_list, &p_endpt->mac_item.pool_item.list_item );\r
                }\r
@@ -4008,6 +4004,14 @@ __endpt_mgr_reset_all(
                        p_port->p_adapter->p_ifc->destroy_av( p_endpt->h_av );\r
                        p_endpt->h_av = NULL;\r
                }\r
+               \r
+               if( p_endpt->dlid )\r
+               {\r
+                       cl_qmap_remove_item( &p_port->endpt_mgr.lid_endpts,\r
+                               &p_endpt->lid_item );\r
+                       p_endpt->dlid = 0;\r
+               }\r
+               \r
        }\r
        cl_obj_unlock( &p_port->obj );\r
 \r