[ofw] [patch][IPoIB_NDIS6_CM] Disable by default Endpoint reference tracking

Alex Naslednikov xalex at mellanox.co.il
Mon Feb 7 01:39:09 PST 2011


Disable by default Endpoint reference tracking because of a bug in this mechanism.
During the testing of UD flow, we found that endpt_deref called more times than endpt_ref
Signed off by: Alexander Naslednikov (xalex at mellanox.co.il)
Index: B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.cpp
===================================================================
--- B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.cpp (revision 7343)
+++ B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.cpp              (revision 7344)
@@ -260,7 +260,7 @@

                cl_obj_unlock( p_obj );

-#if DBG
+#if DBG_ENDPT
                ipoib_port_deref( p_port, ref_endpt_track );
                dmp_ipoib_port_refs( p_port, "endpt_destroying()" );
 #endif
@@ -491,6 +491,10 @@
                                                                {
                                                                                IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
                                                                                                ("Destroy EP %s Object\n", p_endpt->tag) );
+                                                                             //IMPORTANT:
+                                                                             // If defined DBG_ENDPT, that destroy callback of Endpt object, __endpt_destroying,
+                                                                             // will call ipoib_port_deref as well.
+                                                                             // Thus, one should handle this case to avoid multiple derefence of the port object
                                                                                cl_obj_destroy( &p_endpt->obj );
                                                                }
                                                }
Index: B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp           (revision 7343)
+++ B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp        (revision 7344)
@@ -2740,7 +2740,7 @@
                                                                                ("ipoib_endpt_create failed\n") );
                                                                return;
                                                }
-#if DBG
+#if DBG_ENDPT
                                                ipoib_port_ref( p_port, ref_endpt_track );
 #endif
                                                cl_perf_start( EndptInsert );
@@ -7820,7 +7820,7 @@
                                                ("ipoib_endpt_create failed.\n") );
                                return IB_INSUFFICIENT_RESOURCES;
                }
-#if DBG
+#if DBG_ENDPT
                /* set reference to transport to be used while is not attached to the port */
                ipoib_port_ref( p_port, ref_endpt_track );
 #endif
@@ -8068,14 +8068,16 @@
                                                ("Failed to create local endpt\n") );
                                return IB_INSUFFICIENT_MEMORY;
                }
-#if DBG
+#if DBG_ENDPT
                ipoib_port_ref( p_port, ref_endpt_track );
-#endif
+
                StringCchPrintf( p_endpt->tag,
                                                                                 sizeof(p_endpt->tag),
                                                                                 "Local_EP.lid-%#x",
                                                                                 cl_ntoh16(p_port_info->base_lid) );
+#endif

+
                memset( &av_attr, 0, sizeof(ib_av_attr_t) );
                av_attr.port_num = p_port->port_num;
                av_attr.sl = 0;
@@ -8892,7 +8894,7 @@
                                                ("ipoib_endpt_create failed.\n") );
                                return IB_INSUFFICIENT_MEMORY;
                }
-#if DBG
+#if DBG_ENDPT
                ipoib_port_ref( p_port, ref_endpt_track );
 #endif

Alexander (XaleX) Naslednikov
SW Networking Team
Mellanox Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110207/c58bd9a9/attachment.html>


More information about the ofw mailing list