[ofw] [PATCH] use compiler intrinsics instead of complib 3 of 5

Smith, Stan stan.smith at intel.com
Tue Dec 28 14:01:47 PST 2010


Use compiler intrinsics and Ndis routines instead of complib routines for performance & debug.

cl_memclr --> NdisZeroMemory
cl_memcpy --> NdisMoveMemory
cl_memcmp --> memcmp
cl_memset --> memset

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

--- A/ulp/ipoib_ndis6_cm/kernel/ipoib_endpoint.cpp      Wed Nov 17 10:58:07 2010
+++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.cpp      Tue Dec 28 10:54:19 2010
@@ -204,7 +204,7 @@

        p_endpt = PARENT_STRUCT(ph_av, ipoib_endpt_t, h_av );

-       cl_memclr( &av_attr, sizeof(ib_av_attr_t) );
+       NdisZeroMemory( &av_attr, sizeof(ib_av_attr_t) );
        av_attr.port_num = port_num;
        ib_member_get_sl_flow_hop( p_member_rec->sl_flow_hop,
                &av_attr.sl, &flow_lbl, &hop_lmt );
@@ -400,7 +400,7 @@
        }

        /* This is the first packet for this endpoint. Create the AV. */
-       cl_memclr( &av_attr, sizeof(ib_av_attr_t) );
+       NdisZeroMemory( &av_attr, sizeof(ib_av_attr_t) );

        av_attr.port_num = p_port->port_num;

@@ -882,7 +882,7 @@

        if( p_endpt->conn.h_recv_qp )
        {
-               cl_memclr( &mod_attr, sizeof( mod_attr ) );
+               NdisZeroMemory( &mod_attr, sizeof( mod_attr ) );
                mod_attr.req_state = IB_QPS_ERROR;
                p_port->p_adapter->p_ifc->modify_qp( p_endpt->conn.h_send_qp, &mod_attr );
                p_port->p_adapter->p_ifc->modify_qp( p_endpt->conn.h_recv_qp, &mod_attr );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_endpoint.cpp.patch
Type: application/octet-stream
Size: 1072 bytes
Desc: ipoib_endpoint.cpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101228/03b22dea/attachment.obj>


More information about the ofw mailing list