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

Smith, Stan stan.smith at intel.com
Tue Dec 28 14:00:39 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_adapter.cpp       Fri Dec 10 10:50:47 2010
+++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp       Tue Dec 28 11:01:56 2010
@@ -463,7 +463,7 @@
        p_adapter->registering = TRUE;

        /* Register for PNP events. */
-       cl_memclr( &pnp_req, sizeof(pnp_req) );
+       NdisZeroMemory( &pnp_req, sizeof(pnp_req) );
        pnp_req.pnp_class = IB_PNP_PORT | flags;
        /*
         * Context is the cl_obj of the adapter to allow passing cl_obj_deref
@@ -962,7 +962,7 @@
                {
                        for( j = 0; j < num_macs; j++ )
                        {
-                               if( !cl_memcmp( &p_adapter->mcast_array[i], &p_mac_array[j],
+                               if( !memcmp( &p_adapter->mcast_array[i], &p_mac_array[j],
                                        sizeof(mac_addr_t) ) )
                                {
                                        break;
@@ -979,7 +979,7 @@
                {
                        for( j = 0; j < p_adapter->mcast_array_size; j++ )
                        {
-                               if( !cl_memcmp( &p_adapter->mcast_array[j], &p_mac_array[i],
+                               if( !memcmp( &p_adapter->mcast_array[j], &p_mac_array[i],
                                        sizeof(mac_addr_t) ) )
                                {
                                        break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_adapter.cpp.patch
Type: application/octet-stream
Size: 986 bytes
Desc: ipoib_adapter.cpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101228/9cbe931b/attachment.obj>


More information about the ofw mailing list