win-pvdrivers

changeset 225:e90d63d5d794

Removed debug statements to test performance
author James Harper <james.harper@bendigoit.com.au>
date Wed Mar 26 22:05:03 2008 +1100 (2008-03-26)
parents 0e71aec16493
children 9f155354d6ba
files common.inc xennet/xennet_rx.c
line diff
     1.1 --- a/common.inc	Wed Mar 26 20:42:58 2008 +1100
     1.2 +++ b/common.inc	Wed Mar 26 22:05:03 2008 +1100
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.8.5.89
     1.5 +VERSION=0.8.5.90
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  KMDF_VERSION=1
     1.8  !IF $(_NT_TOOLS_VERSION) > 0x700
     2.1 --- a/xennet/xennet_rx.c	Wed Mar 26 20:42:58 2008 +1100
     2.2 +++ b/xennet/xennet_rx.c	Wed Mar 26 22:05:03 2008 +1100
     2.3 @@ -267,7 +267,7 @@ XenNet_SumTcpPacket(
     2.4    USHORT remaining;
     2.5    USHORT ip4_length;
     2.6  
     2.7 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
     2.8 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
     2.9  
    2.10    #if defined(XEN_PROFILE)
    2.11    ProfCount_RxPacketsCsumOffload++;
    2.12 @@ -307,7 +307,7 @@ XenNet_SumTcpPacket(
    2.13          return;
    2.14        }
    2.15        NdisQueryBufferSafe(mdl, &buffer, &buffer_length, NormalPagePriority);
    2.16 -      KdPrint((__DRIVER_NAME "     New buffer - unaligned...\n"));
    2.17 +//      KdPrint((__DRIVER_NAME "     New buffer - unaligned...\n"));
    2.18        csum += ((USHORT)buffer[0]);
    2.19        buffer_offset = (USHORT)-1;
    2.20      }
    2.21 @@ -315,7 +315,7 @@ XenNet_SumTcpPacket(
    2.22      {
    2.23        if (buffer_offset == buffer_length)
    2.24        {
    2.25 -        KdPrint((__DRIVER_NAME "     New buffer - aligned...\n"));
    2.26 +//        KdPrint((__DRIVER_NAME "     New buffer - aligned...\n"));
    2.27          NdisGetNextBuffer(mdl, &mdl);
    2.28          if (mdl == NULL)
    2.29          {
    2.30 @@ -338,9 +338,9 @@ XenNet_SumTcpPacket(
    2.31      csum = (csum & 0xFFFF) + (csum >> 16);
    2.32    *csum_ptr = (USHORT)~GET_NET_USHORT(csum);
    2.33  
    2.34 -  KdPrint((__DRIVER_NAME "     csum = %04x\n", *csum_ptr));
    2.35 +//  KdPrint((__DRIVER_NAME "     csum = %04x\n", *csum_ptr));
    2.36  
    2.37 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    2.38 +//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    2.39  }
    2.40  
    2.41  static PUCHAR
    2.42 @@ -353,11 +353,11 @@ XenNet_GetData(
    2.43    PNDIS_BUFFER mdl = xi->rxpi.mdls[xi->rxpi.curr_mdl];
    2.44    PUCHAR buffer = (PUCHAR)MmGetMdlVirtualAddress(mdl) + xi->rxpi.curr_mdl_offset;
    2.45  
    2.46 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    2.47 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    2.48  
    2.49    *length = (USHORT)min(req_length, MmGetMdlByteCount(mdl) - xi->rxpi.curr_mdl_offset);
    2.50  
    2.51 -  KdPrint((__DRIVER_NAME "     req_length = %d, length = %d\n", req_length, *length));
    2.52 +//  KdPrint((__DRIVER_NAME "     req_length = %d, length = %d\n", req_length, *length));
    2.53  
    2.54    xi->rxpi.curr_mdl_offset = xi->rxpi.curr_mdl_offset + *length;
    2.55    if (xi->rxpi.curr_mdl_offset == MmGetMdlByteCount(mdl))
    2.56 @@ -366,7 +366,7 @@ XenNet_GetData(
    2.57      xi->rxpi.curr_mdl_offset = 0;
    2.58    }
    2.59  
    2.60 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    2.61 +//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    2.62  
    2.63    return buffer;
    2.64  }
    2.65 @@ -387,7 +387,7 @@ XenNet_MakePacket(
    2.66    NDIS_STATUS status;
    2.67    USHORT i;
    2.68  
    2.69 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    2.70 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    2.71  
    2.72    NdisAllocatePacket(&status, &packet, xi->packet_pool);
    2.73    ASSERT(status == NDIS_STATUS_SUCCESS);
    2.74 @@ -426,7 +426,7 @@ XenNet_MakePacket(
    2.75      NDIS_SET_PACKET_STATUS(packet, NDIS_STATUS_SUCCESS);
    2.76    }
    2.77  
    2.78 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (%p)\n", packet));
    2.79 +//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (%p)\n", packet));
    2.80    return packet;
    2.81  }
    2.82  
    2.83 @@ -439,7 +439,7 @@ XenNet_MakePackets(
    2.84  {
    2.85    USHORT i;
    2.86  
    2.87 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "(packets = %p, packet_count = %d)\n", packets, *packet_count_p));
    2.88 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "(packets = %p, packet_count = %d)\n", packets, *packet_count_p));
    2.89  
    2.90    XenNet_ParseHeader(xi);
    2.91    switch (xi->rxpi.ip_proto)
    2.92 @@ -453,15 +453,15 @@ XenNet_MakePackets(
    2.93      if (xi->rxpi.csum_calc_required)
    2.94        XenNet_SumTcpPacket(xi, packets[*packet_count_p]);
    2.95      (*packet_count_p)++;
    2.96 -    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (TCP/UDP)\n"));
    2.97 +//    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (TCP/UDP)\n"));
    2.98      return;
    2.99    default:
   2.100      packets[*packet_count_p] = XenNet_MakePacket(xi);
   2.101      (*packet_count_p)++;
   2.102 -    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (Other)\n"));
   2.103 +//    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (Other)\n"));
   2.104      return;
   2.105    }
   2.106 -  KdPrint((__DRIVER_NAME "     splitting packet\n"));
   2.107 +//  KdPrint((__DRIVER_NAME "     splitting packet\n"));
   2.108    xi->rxpi.tcp_remaining = xi->rxpi.tcp_length;
   2.109    if (MmGetMdlByteCount(xi->rxpi.mdls[0]) > (ULONG)(XN_HDR_SIZE + xi->rxpi.ip4_header_length + xi->rxpi.tcp_header_length))
   2.110      xi->rxpi.curr_mdl_offset = XN_HDR_SIZE + xi->rxpi.ip4_header_length + xi->rxpi.tcp_header_length;
   2.111 @@ -470,20 +470,20 @@ XenNet_MakePackets(
   2.112  
   2.113    while (xi->rxpi.tcp_remaining)
   2.114    {
   2.115 -    KdPrint((__DRIVER_NAME "     tcp_remaining = %d\n", xi->rxpi.tcp_remaining));
   2.116 +//    KdPrint((__DRIVER_NAME "     tcp_remaining = %d\n", xi->rxpi.tcp_remaining));
   2.117      packets[*packet_count_p] = XenNet_MakePacket(xi);
   2.118      XenNet_SumTcpPacket(xi, packets[*packet_count_p]);
   2.119      (*packet_count_p)++;
   2.120    }
   2.121    ASSERT(xi->rxpi.curr_mdl == xi->rxpi.mdl_count);
   2.122 -  KdPrint((__DRIVER_NAME "     tcp_remaining = %d\n", xi->rxpi.tcp_remaining));
   2.123 +//  KdPrint((__DRIVER_NAME "     tcp_remaining = %d\n", xi->rxpi.tcp_remaining));
   2.124    // TODO: restore psh status to last packet
   2.125    for (i = 0; i < xi->rxpi.mdl_count; i++)
   2.126    {
   2.127      NdisAdjustBufferLength(xi->rxpi.mdls[i], PAGE_SIZE);
   2.128      put_page_on_freelist(xi, xi->rxpi.mdls[i]);
   2.129    }
   2.130 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (split)\n"));
   2.131 +//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (split)\n"));
   2.132  }
   2.133  
   2.134  // Called at DISPATCH_LEVEL
   2.135 @@ -503,7 +503,7 @@ XenNet_RxBufferCheck(struct xennet_info 
   2.136    LARGE_INTEGER tsc, tsc2, dummy;
   2.137  #endif
   2.138    
   2.139 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   2.140 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   2.141  
   2.142  #if defined(XEN_PROFILE)
   2.143    tsc = tsc2 = KeQueryPerformanceCounter(&dummy);
   2.144 @@ -609,7 +609,7 @@ XenNet_RxBufferCheck(struct xennet_info 
   2.145  #endif
   2.146    }
   2.147  
   2.148 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (rx_outstanding = %d)\n", xi->rx_outstanding));
   2.149 +//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ " (rx_outstanding = %d)\n", xi->rx_outstanding));
   2.150  
   2.151  #if defined(XEN_PROFILE)
   2.152    ProfTime_RxBufferCheck.QuadPart += KeQueryPerformanceCounter(&dummy).QuadPart - tsc.QuadPart;
   2.153 @@ -635,7 +635,7 @@ XenNet_ReturnPacket(
   2.154    LARGE_INTEGER tsc, dummy;
   2.155  #endif
   2.156  
   2.157 -  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ " (%p)\n", Packet));
   2.158 +//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ " (%p)\n", Packet));
   2.159  
   2.160  #if defined(XEN_PROFILE)
   2.161    tsc = KeQueryPerformanceCounter(&dummy);
   2.162 @@ -657,7 +657,7 @@ XenNet_ReturnPacket(
   2.163  
   2.164    KeReleaseSpinLockFromDpcLevel(&xi->rx_lock);
   2.165    
   2.166 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   2.167 +//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   2.168  
   2.169  #if defined(XEN_PROFILE)
   2.170    ProfTime_ReturnPacket.QuadPart += KeQueryPerformanceCounter(&dummy).QuadPart - tsc.QuadPart;