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

Alex Naslednikov xalex at mellanox.co.il
Sun Sep 26 03:58:14 PDT 2010


Hello Stan,
Some questions and remarks.
1. Have you tested it when we have 2 adapters within the same subnet ?
What will happen when one adapters suddenly goes down and NDIS decides to send the NBL via the second one ?
I suppose that in that case adapter interface should be set dynamically, while preserving all other fields.

2. This flow should be same for IPoIB and IPoIB_NDIS6_CM trees.

XaleX

-----Original Message-----
From: Smith, Stan [mailto:stan.smith at intel.com] 
Sent: Thursday, September 23, 2010 7:14 PM
To: Alex Naslednikov
Cc: ofw at lists.openfabrics.org
Subject: [PATCH] IPoIB_NDIS6_CM - initialize p_endpt->p_ifc once and early.


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