[ofw] [PATCH] IPoIB_NDIS6_CM - initialize p_endpt->p_ifc once and early.

Smith, Stan stan.smith at intel.com
Thu Sep 23 10:14:22 PDT 2010


Initialize the endpoint pointer to IBAL interfaces 'p_endpt->p_ifc' only once during endpoint creation so the pointer field is valid for the life of the endpoint.
Tested in winOFED 2.3 RC3 validation (svr 2008:x86 & x64); no observed problems.

signed-off-by: stan smith <stan.smith at intel.com>

--- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.cpp      Thu Sep 23 10:04:26 2010
+++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.cpp      Thu Sep 23 10:03:57 2010
@@ -179,6 +179,7 @@
        p_endpt->dgid = *p_dgid;
        p_endpt->dlid = dlid;
        p_endpt->qpn = qpn;
+       p_endpt->p_ifc = p_port->p_adapter->p_ifc;

        IPOIB_EXIT( IPOIB_DBG_ENDPT );
        return p_endpt;


--- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp  Thu Sep 23 10:05:12 2010
+++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp  Thu Sep 23 10:03:23 2010
@@ -6808,7 +6808,6 @@
        }
        /* set reference to transport to be used while is not attached to the port */
        p_endpt->is_mcast_listener = TRUE;
-       p_endpt->p_ifc = p_port->p_adapter->p_ifc;
        status = ipoib_endpt_set_mcast( p_endpt,
                                                                        p_port->ib_mgr.h_pd,
                                                                        p_port->port_num,
@@ -7954,7 +7953,6 @@
        }

        p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, gid_item );
-       p_endpt->p_ifc = p_port->p_adapter->p_ifc;

        /* Setup the endpoint for use. */
        status = ipoib_endpt_set_mcast( p_endpt,



More information about the ofw mailing list