win-pvdrivers

changeset 922:5604d7645acc

Remove debug logging
author James Harper <james.harper@bendigoit.com.au>
date Sat May 21 19:34:57 2011 +1000 (2011-05-21)
parents dc37dfde7673
children 5c84e3cd00b2
files xennet/xennet5_rx.c
line diff
     1.1 --- a/xennet/xennet5_rx.c	Sat May 14 15:15:18 2011 +1000
     1.2 +++ b/xennet/xennet5_rx.c	Sat May 21 19:34:57 2011 +1000
     1.3 @@ -20,8 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fi
     1.4  
     1.5  #include "xennet5.h"
     1.6  
     1.7 -static LONG rx_pb_outstanding = 0;
     1.8 -
     1.9  static __inline shared_buffer_t *
    1.10  get_pb_from_freelist(struct xennet_info *xi)
    1.11  {
    1.12 @@ -34,7 +32,6 @@ get_pb_from_freelist(struct xennet_info 
    1.13      pb = ptr_ref;
    1.14      pb->ref_count = 1;
    1.15      InterlockedDecrement(&xi->rx_pb_free);
    1.16 -    InterlockedIncrement(&rx_pb_outstanding);
    1.17      return pb;
    1.18    }
    1.19  
    1.20 @@ -71,7 +68,6 @@ get_pb_from_freelist(struct xennet_info 
    1.21      NdisFreeMemory(pb->virtual, PAGE_SIZE, 0);
    1.22      return NULL;
    1.23    }
    1.24 -  InterlockedIncrement(&rx_pb_outstanding);
    1.25    pb->ref_count = 1;
    1.26    return pb;
    1.27  }
    1.28 @@ -93,7 +89,6 @@ put_pb_on_freelist(struct xennet_info *x
    1.29      pb->next = NULL;
    1.30      stack_push(xi->rx_pb_stack, pb);
    1.31      InterlockedIncrement(&xi->rx_pb_free);
    1.32 -    InterlockedDecrement(&rx_pb_outstanding);
    1.33    }
    1.34  }
    1.35  
    1.36 @@ -150,11 +145,6 @@ XenNet_FillRing(struct xennet_info *xi)
    1.37    return NDIS_STATUS_SUCCESS;
    1.38  }
    1.39  
    1.40 -LONG total_allocated_packets = 0;
    1.41 -LONG dpc_limit_hit = 0;
    1.42 -LONG resource_packets = 0;
    1.43 -LARGE_INTEGER last_print_time;
    1.44 -
    1.45  /* lock free */
    1.46  static PNDIS_PACKET
    1.47  get_packet_from_freelist(struct xennet_info *xi)
    1.48 @@ -166,7 +156,6 @@ get_packet_from_freelist(struct xennet_i
    1.49    if (stack_pop(xi->rx_packet_stack, &ptr_ref))
    1.50    {
    1.51      packet = ptr_ref;
    1.52 -    InterlockedIncrement(&total_allocated_packets);
    1.53      return packet;
    1.54    }
    1.55    
    1.56 @@ -181,7 +170,6 @@ get_packet_from_freelist(struct xennet_i
    1.57    }
    1.58    NDIS_SET_PACKET_HEADER_SIZE(packet, XN_HDR_SIZE);
    1.59    NdisZeroMemory(packet->MiniportReservedEx, sizeof(packet->MiniportReservedEx));
    1.60 -  InterlockedIncrement(&total_allocated_packets);
    1.61    return packet;
    1.62  }
    1.63  
    1.64 @@ -189,13 +177,9 @@ get_packet_from_freelist(struct xennet_i
    1.65  static VOID
    1.66  put_packet_on_freelist(struct xennet_info *xi, PNDIS_PACKET packet)
    1.67  {
    1.68 -  LARGE_INTEGER current_time;
    1.69    PNDIS_TCP_IP_CHECKSUM_PACKET_INFO csum_info;
    1.70  
    1.71    UNREFERENCED_PARAMETER(xi);
    1.72 -  
    1.73 -  InterlockedDecrement(&total_allocated_packets);
    1.74 -
    1.75    NdisReinitializePacket(packet);
    1.76    RtlZeroMemory(NDIS_PACKET_EXTENSION_FROM_PACKET(packet), sizeof(NDIS_PACKET_EXTENSION));
    1.77    csum_info = (PNDIS_TCP_IP_CHECKSUM_PACKET_INFO)&NDIS_PER_PACKET_INFO_FROM_PACKET(
    1.78 @@ -203,13 +187,6 @@ put_packet_on_freelist(struct xennet_inf
    1.79    csum_info->Value = 0;
    1.80  
    1.81    stack_push(xi->rx_packet_stack, packet);
    1.82 -
    1.83 -  KeQuerySystemTime(&current_time);
    1.84 -  if ((current_time.QuadPart - last_print_time.QuadPart) / 10000 > 5000)
    1.85 -  {
    1.86 -    last_print_time.QuadPart = current_time.QuadPart;
    1.87 -    KdPrint(("total_allocated_packets = %d, rx_outstanding = %d, resource_packets = %d, dpc_limit_hit = %d, rx_pb_outstanding = %d, rx_pb_free = %d\n", total_allocated_packets, xi->rx_outstanding, resource_packets, dpc_limit_hit, rx_pb_outstanding, xi->rx_pb_free));
    1.88 -  }
    1.89  }
    1.90  
    1.91  static PNDIS_PACKET
    1.92 @@ -851,8 +828,6 @@ XenNet_RxBufferCheck(struct xennet_info 
    1.93    if (packet_count >= MAXIMUM_PACKETS_PER_INTERRUPT || packet_data >= MAXIMUM_DATA_PER_INTERRUPT)
    1.94    {
    1.95      /* fire again immediately */
    1.96 -    //KdPrint((__DRIVER_NAME "     Dpc Duration Exceeded\n"));
    1.97 -    dpc_limit_hit++;
    1.98      /* we want the Dpc on the end of the queue. By definition we are already on the right CPU so we know the Dpc queue will be run immediately */
    1.99      KeSetImportanceDpc(&xi->rxtx_dpc, MediumImportance);
   1.100      KeInsertQueueDpc(&xi->rxtx_dpc, NULL, NULL);
   1.101 @@ -981,7 +956,6 @@ XenNet_RxBufferCheck(struct xennet_info 
   1.102    while (entry != &rx_header_only_packet_list) {
   1.103      PNDIS_PACKET packet = CONTAINING_RECORD(entry, NDIS_PACKET, MiniportReservedEx[sizeof(PVOID)]);
   1.104      entry = RemoveHeadList(&rx_header_only_packet_list);
   1.105 -    InterlockedIncrement(&resource_packets);
   1.106      XenNet_ReturnPacket(xi, packet);
   1.107    }
   1.108    return dont_set_event;