[ipoib] Make sure that the dlid is zero if it is not in the list.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Nov 2008 17:12:07 +0000 (17:12 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Nov 2008 17:12:07 +0000 (17:12 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1745 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_port.c

index fe95ab5..2d55dbf 100644 (file)
@@ -5037,6 +5037,10 @@ __endpt_mgr_insert(
                p_qitem = cl_qmap_insert(\r
                        &p_port->endpt_mgr.lid_endpts, p_endpt->dlid, &p_endpt->lid_item );\r
                CL_ASSERT( p_qitem == &p_endpt->lid_item );\r
+               if (p_qitem != &p_endpt->lid_item) {\r
+                       // Since we failed to insert into the list, make sure it is not removed\r
+                       p_endpt->dlid =0;\r
+               }\r
        }\r
 \r
        IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
@@ -6124,6 +6128,11 @@ __mcast_cb(
                p_qitem = cl_qmap_insert(\r
                        &p_port->endpt_mgr.lid_endpts, p_endpt->dlid, &p_endpt->lid_item );\r
                CL_ASSERT( p_qitem == &p_endpt->lid_item );\r
+               if (p_qitem != &p_endpt->lid_item) {\r
+                       // Since we failed to insert into the list, make sure it is not removed\r
+                       p_endpt->dlid =0;\r
+               }\r
+               \r
        }\r
        /* set flag that endpoint is use */\r
        p_endpt->is_in_use = TRUE;\r