win-pvdrivers

changeset 220:d076e1ed8071

Continued with rx. Fixed nasty bug in xennet_oid.c
author James Harper <james.harper@bendigoit.com.au>
date Sat Mar 22 22:35:17 2008 +1100 (2008-03-22)
parents 6974a4ace9d3
children 03fcf506d609
files common.inc xennet/xennet.h xennet/xennet_oid.c xennet/xennet_rx.c
line diff
     1.1 --- a/common.inc	Sat Mar 22 16:57:29 2008 +1100
     1.2 +++ b/common.inc	Sat Mar 22 22:35:17 2008 +1100
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.8.5.43
     1.5 +VERSION=0.8.5.47
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  KMDF_VERSION=1
     1.8  !IF $(_NT_TOOLS_VERSION) > 0x700
     2.1 --- a/xennet/xennet.h	Sat Mar 22 16:57:29 2008 +1100
     2.2 +++ b/xennet/xennet.h	Sat Mar 22 22:35:17 2008 +1100
     2.3 @@ -104,11 +104,14 @@ Foundation, Inc., 51 Franklin Street, Fi
     2.4  typedef struct {
     2.5    PNDIS_BUFFER mdls[MAX_BUFFERS_PER_PACKET];
     2.6    ULONG mdl_count;
     2.7 +  USHORT curr_mdl;
     2.8 +  USHORT curr_mdl_offset;
     2.9    USHORT mss;
    2.10    NDIS_TCP_IP_CHECKSUM_PACKET_INFO csum_info;
    2.11    BOOLEAN csum_calc_required;
    2.12    BOOLEAN split_required;
    2.13    UCHAR ip_version;
    2.14 +  UCHAR ip_proto;
    2.15    USHORT total_length;
    2.16    USHORT ip4_header_length;
    2.17    USHORT ip4_length;
    2.18 @@ -174,7 +177,7 @@ struct xennet_info
    2.19    PMDL page_list[NET_RX_RING_SIZE];
    2.20    ULONG page_free;
    2.21  
    2.22 -  rx_packet_info_t rx;
    2.23 +  rx_packet_info_t rxpi;
    2.24  /*
    2.25    PNDIS_PACKET rx_current_packet;
    2.26    PMDL rx_first_mdl;
     3.1 --- a/xennet/xennet_oid.c	Sat Mar 22 16:57:29 2008 +1100
     3.2 +++ b/xennet/xennet_oid.c	Sat Mar 22 22:35:17 2008 +1100
     3.3 @@ -291,7 +291,6 @@ XenNet_QueryInformation(
     3.4          }
     3.5    
     3.6          /* fill in second nto */
     3.7 -        nto = (PNDIS_TASK_OFFLOAD)((PCHAR)(nto) + nto->OffsetNextTask);
     3.8          nto->Version = NDIS_TASK_OFFLOAD_VERSION;
     3.9          nto->Size = sizeof(NDIS_TASK_OFFLOAD);
    3.10          nto->Task = TcpLargeSendNdisTask;
     4.1 --- a/xennet/xennet_rx.c	Sat Mar 22 16:57:29 2008 +1100
     4.2 +++ b/xennet/xennet_rx.c	Sat Mar 22 22:35:17 2008 +1100
     4.3 @@ -162,29 +162,28 @@ XenNet_ParseHeader(
     4.4  
     4.5    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
     4.6  
     4.7 -  ASSERT(!xi->rx.mdls[0]);
     4.8 +  ASSERT(xi->rxpi.mdls[0]);
     4.9    
    4.10 -  NdisQueryBuffer(xi->rx.mdls[0], &buffer, &buffer_length);
    4.11 +  NdisQueryBufferSafe(xi->rxpi.mdls[0], &buffer, &buffer_length, NormalPagePriority);
    4.12  
    4.13    if (buffer_length < XN_HDR_SIZE + 20 + 20) // minimum size of first buffer is ETH + IP + TCP header
    4.14    {
    4.15 -    KdPrint((__DRIVER_NAME "     %d is not enough data for the first buffer\n", buffer_length));
    4.16      return;
    4.17    }
    4.18    
    4.19    switch (NET_USHORT(buffer[12])) // L2 protocol field
    4.20    {
    4.21    case 0x0800:
    4.22 -    ip_version = (buffer[XN_HDR_SIZE + 0] & 0xF0) >> 4;
    4.23 -    if (xi->rx.ip_version != 4)
    4.24 +    xi->rxpi.ip_version = (buffer[XN_HDR_SIZE + 0] & 0xF0) >> 4;
    4.25 +    if (xi->rxpi.ip_version != 4)
    4.26      {
    4.27 -      KdPrint((__DRIVER_NAME "     ip_version = %d\n", xi->rx.ip_version));
    4.28 +      KdPrint((__DRIVER_NAME "     ip_version = %d\n", xi->rxpi.ip_version));
    4.29        return;
    4.30      }
    4.31 -    xi->rx.ip4_header_length = (buffer[XN_HDR_SIZE + 0] & 0x0F) << 2;
    4.32 -    if (buffer_length < (ULONG)(xi->rx.ip4_header_length + 20))
    4.33 +    xi->rxpi.ip4_header_length = (buffer[XN_HDR_SIZE + 0] & 0x0F) << 2;
    4.34 +    if (buffer_length < (ULONG)(xi->rxpi.ip4_header_length + 20))
    4.35      {
    4.36 -      KdPrint((__DRIVER_NAME "     first packet is only %d long, must be >= %d\n", XN_HDR_SIZE + buffer_length, (ULONG)(XN_HDR_SIZE + xi->rx.ip4_header_length + 20)));
    4.37 +      KdPrint((__DRIVER_NAME "     first packet is only %d long, must be >= %d\n", XN_HDR_SIZE + buffer_length, (ULONG)(XN_HDR_SIZE + xi->rxpi.ip4_header_length + 20)));
    4.38        return;
    4.39      }
    4.40      break;
    4.41 @@ -192,18 +191,18 @@ XenNet_ParseHeader(
    4.42      KdPrint((__DRIVER_NAME "     Not IP\n"));
    4.43      return;
    4.44    }
    4.45 -  xi->rx.ip4_proto = buffer[XN_HDR_SIZE + 9];
    4.46 -  switch (xi->rx.ip4_proto)
    4.47 +  xi->rxpi.ip_proto = buffer[XN_HDR_SIZE + 9];
    4.48 +  switch (xi->rxpi.ip_proto)
    4.49    {
    4.50    case 6:  // TCP
    4.51    case 17: // UDP
    4.52      break;
    4.53    default:
    4.54 -    KdPrint((__DRIVER_NAME "     Not TCP or UDP\n"));
    4.55      return;
    4.56    }
    4.57 -  xi->rx.ip4_length = NET_USHORT(buffer[XN_HDR_SIZE + 2]);
    4.58 -  xi->rx.tcp_header_length = (buffer[XN_HDR_SIZE + xi->rx.ip4_header_length + 12] & 0xf0) >> 2;
    4.59 +  xi->rxpi.ip4_length = NET_USHORT(buffer[XN_HDR_SIZE + 2]);
    4.60 +  xi->rxpi.tcp_header_length = (buffer[XN_HDR_SIZE + xi->rxpi.ip4_header_length + 12] & 0xf0) >> 2;
    4.61 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    4.62  }
    4.63  
    4.64  /*
    4.65 @@ -213,7 +212,8 @@ XenNet_ParseHeader(
    4.66   This is only for TCP and UDP packets. IP checksums appear to be correct anyways.
    4.67  */
    4.68  static VOID
    4.69 -XenNet_SumData(
    4.70 +XenNet_SumPacket(
    4.71 +  struct xennet_info *xi,  
    4.72    PNDIS_PACKET packet
    4.73  )
    4.74  {
    4.75 @@ -222,32 +222,34 @@ XenNet_SumData(
    4.76    PMDL mdl;
    4.77    UINT total_length;
    4.78    UINT buffer_length;
    4.79 +  USHORT buffer_offset;
    4.80    ULONG csum, pre_csum;
    4.81    PUSHORT csum_ptr;
    4.82 -  PNDIS_PACKET packet;
    4.83 +  USHORT remaining;
    4.84 +  USHORT tcp_length;
    4.85  
    4.86    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    4.87  
    4.88 -  mss = PtrToUlong(NDIS_PER_PACKET_INFO_FROM_PACKET(packets[packet_count], TcpLargeSendPacketInfo);
    4.89    NdisGetFirstBufferFromPacketSafe(packet, &mdl, &buffer, &buffer_length, &total_length, NormalPagePriority);
    4.90    ASSERT(mdl);
    4.91  
    4.92 -  csum_ptr = (USHORT *)&buffer[XN_HDR_SIZE + xi->rx.ip4_header_length + 16];
    4.93 +  csum_ptr = (USHORT *)&buffer[XN_HDR_SIZE + xi->rxpi.ip4_header_length + 16];
    4.94    *csum_ptr = 0;
    4.95  
    4.96 -  ASSERT((USHORT)(ip4_length + XN_HDR_SIZE) == total_length);
    4.97 +  ASSERT((USHORT)(xi->rxpi.ip4_length + XN_HDR_SIZE) == xi->rxpi.total_length);
    4.98  
    4.99 -  remaining = ip4_length - ip4_header_length - tcp_header_length;
   4.100 +  remaining = xi->rxpi.ip4_length - xi->rxpi.ip4_header_length - xi->rxpi.tcp_header_length;
   4.101    // TODO: pre-calc a sum of the header...
   4.102    pre_csum = 0;
   4.103    pre_csum += NET_USHORT(buffer[XN_HDR_SIZE + 12]) + NET_USHORT(buffer[XN_HDR_SIZE + 14]);
   4.104    pre_csum += NET_USHORT(buffer[XN_HDR_SIZE + 16]) + NET_USHORT(buffer[XN_HDR_SIZE + 18]);
   4.105    pre_csum += ((USHORT)buffer[XN_HDR_SIZE + 9]);
   4.106  
   4.107 -  remaining = ip4_length - ip4_header_length;
   4.108 +  remaining = xi->rxpi.ip4_length - xi->rxpi.ip4_header_length;
   4.109 +  tcp_length = remaining;
   4.110  
   4.111 -  csum = pre_csum + tcp_length;
   4.112 -  for (buffer_offset = i = XN_HDR_SIZE + ip4_header_length; i < tcp_length - 1; i += 2, buffer_offset += 2)
   4.113 +  csum = pre_csum + xi->rxpi.tcp_length;
   4.114 +  for (buffer_offset = i = XN_HDR_SIZE + xi->rxpi.ip4_header_length; i < tcp_length - 1; i += 2, buffer_offset += 2)
   4.115    {
   4.116      if (buffer_offset == buffer_length - 1) // deal with a buffer ending on an odd byte boundary
   4.117      {
   4.118 @@ -281,7 +283,7 @@ XenNet_SumData(
   4.119  //KdPrint((__DRIVER_NAME "     %04X\n", NET_USHORT(buffer[buffer_offset])));
   4.120      }
   4.121    }
   4.122 -  if (i != ip4_length) // last odd byte
   4.123 +  if (i != xi->rxpi.ip4_length) // last odd byte
   4.124    {
   4.125  //KdPrint((__DRIVER_NAME "    *%04X\n", (USHORT)buffer[buffer_offset] << 8));
   4.126      csum += ((USHORT)buffer[buffer_offset] << 8);
   4.127 @@ -295,30 +297,31 @@ XenNet_SumData(
   4.128    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.129  }
   4.130  
   4.131 +#if 0
   4.132  static PUCHAR
   4.133  XenNet_GetMoreData(
   4.134    struct xennet_info xi,
   4.135    PUSHORT remaining
   4.136  )
   4.137  {
   4.138 -  PNDIS_BUFFER mdl = xi->rx.mdls[mdl_number];
   4.139 -  PUCHAR buffer = MmGetMdlVirtualAddress(mdl) + xi->rx.curr_mdl_offset;
   4.140 -  USHORT length = min(*remaining, MmGetMdlByteCount(mdl) - xi->rx.curr_mdl_offset);
   4.141 +  PNDIS_BUFFER mdl = xi->rxpi.mdls[mdl_number];
   4.142 +  PUCHAR buffer = MmGetMdlVirtualAddress(mdl) + xi->rxpi.curr_mdl_offset;
   4.143 +  USHORT length = min(*remaining, MmGetMdlByteCount(mdl) - xi->rxpi.curr_mdl_offset);
   4.144 +
   4.145 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.146  
   4.147    *remaining -= length;
   4.148 -  xi->rx.curr_mdl_offset += length;
   4.149 -  if (xi->rx.curr_mdl_offset == MmGetMdlByteCount(mdl))
   4.150 -    xi->rx.mdl_number++;
   4.151 +  xi->rxpi.curr_mdl_offset += length;
   4.152 +  if (xi->rxpi.curr_mdl_offset == MmGetMdlByteCount(mdl))
   4.153 +    xi->rxpi.mdl_number++;
   4.154    return buffer;
   4.155  }
   4.156 +#endif
   4.157  
   4.158 -
   4.159 -static NDIS_PACKET
   4.160 +static PNDIS_PACKET
   4.161  XenNet_MakePacket(
   4.162 -  struct xennet_info xi,
   4.163 -  PUCHAR header,
   4.164 -  ULONG mdl_number,
   4.165 -  ULONG buf_offset;
   4.166 +  struct xennet_info *xi,
   4.167 +  PUCHAR header
   4.168  )
   4.169  {
   4.170    PNDIS_PACKET packet;
   4.171 @@ -326,33 +329,42 @@ XenNet_MakePacket(
   4.172    PNDIS_BUFFER out_mdl;
   4.173    PUCHAR out_buffer;
   4.174    USHORT out_offset;
   4.175 +  NDIS_STATUS status;
   4.176 +  int i;
   4.177  
   4.178 -  NdisAllocatePacket(&status, &packets[*packet_count], xi->packet_pool);
   4.179 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.180 +
   4.181 +  NdisAllocatePacket(&status, &packet, xi->packet_pool);
   4.182    ASSERT(status == NDIS_STATUS_SUCCESS);
   4.183 -  NDIS_SET_PACKET_HEADER_SIZE(packets[*packet_count], XN_HDR_SIZE);
   4.184 +  NDIS_SET_PACKET_HEADER_SIZE(packet, XN_HDR_SIZE);
   4.185 +#if 0
   4.186    if (header == NULL)
   4.187    {
   4.188 -    for (i = 0; i < xi->rx.mdl_count; i++)
   4.189 -      NdisChainBufferAtBack(packet, mdls[i]);
   4.190 +#endif
   4.191 +    for (i = 0; i < xi->rxpi.mdl_count; i++)
   4.192 +      NdisChainBufferAtBack(packet, xi->rxpi.mdls[i]);
   4.193      NDIS_SET_PACKET_STATUS(packet, NDIS_STATUS_SUCCESS);
   4.194 +#if 0
   4.195    }
   4.196    else
   4.197    {
   4.198      out_mdl = get_page_from_freelist(xi);
   4.199      out_buffer = out_ptr = MmGetMdlVirtualAddress(out_mdl);
   4.200 -    out_offset = XN_HDR_SIZE + xi->rx.ip4_header_length + xi->rx.tcp_header_length;
   4.201 -    out_remaining = xi->rx.mss;
   4.202 +    out_offset = XN_HDR_SIZE + xi->rxpi.ip4_header_length + xi->rxpi.tcp_header_length;
   4.203 +    out_remaining = xi->rxpi.mss;
   4.204      memcpy(out_buffer, header, out_offset);
   4.205      do 
   4.206      {
   4.207        in_buffer = XenNet_GetMoreData(xi, &out_remaining, &length);
   4.208        memcpy(&out_buffer[out_offset], in_buffer, length);
   4.209      } while (out_remaining != 0 && in_buffer != NULL)
   4.210 -    length = xi->rx.mss - out_remaining;
   4.211 +    length = xi->rxpi.mss - out_remaining;
   4.212      in_buffer[___ip4_length_offset___] = NET_USHORT(...); // recalc this
   4.213      in_buffer[___mss_offset___] = NET_USHORT(length);
   4.214      in_buffer[___seq_offset___] = NET_ULONG(in_buffer[___seq_offset___]) + ???
   4.215    }
   4.216 +#endif
   4.217 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.218    return packet;
   4.219  }
   4.220  
   4.221 @@ -378,32 +390,34 @@ XenNet_MakePackets(
   4.222    ULONG total_in_remaining;
   4.223    ULONG buffer_in_remaining;
   4.224  
   4.225 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.226 +
   4.227    XenNet_ParseHeader(xi);
   4.228 -  switch (xi->rx.ip4_proto)
   4.229 +  switch (xi->rxpi.ip_proto)
   4.230    {
   4.231    case 6:  // TCP
   4.232 -    if (xi->rx.split_required)
   4.233 +#if 0
   4.234 +    if (xi->rxpi.split_required)
   4.235        break;
   4.236 -    packets[*packet_count] = XenNet_MakePacket(xi);
   4.237 -    if (xi->rx.csum_calc_required)
   4.238 -      XenNet_SumPacket(xi, packets[*packet_count];
   4.239 -    *packet_count++;
   4.240 -    return;
   4.241 +#endif
   4.242 +  // fallthrough
   4.243    case 17:  // UDP
   4.244 -    packets[*packet_count] = XenNet_MakePacket(xi);
   4.245 -    if (xi->rx.csum_calc_required)
   4.246 -      XenNet_SumPacket(xi, packets[*packet_count];
   4.247 +    packets[*packet_count] = XenNet_MakePacket(xi, NULL);
   4.248 +//    if (xi->rxpi.csum_calc_required)
   4.249 +//      XenNet_SumPacket(xi, packets[*packet_count]);
   4.250      *packet_count++;
   4.251      return;
   4.252    default:
   4.253 -    packets[*packet_count] = XenNet_MakePacket(xi, ...);
   4.254 +    packets[*packet_count] = XenNet_MakePacket(xi, NULL);
   4.255      *packet_count++;
   4.256      return;
   4.257    }
   4.258 -
   4.259 +#if 0
   4.260 +  header = 0; //TODO: fix this
   4.261 +  current
   4.262    while (data left in buffer)
   4.263    {
   4.264 -    packets[*packet_count] = XenNet_MakePacket(xi, ...);
   4.265 +    packets[*packet_count] = XenNet_MakePacket(xi, header);
   4.266      XenNet_SumPacket(xi, packets[*packet_count];
   4.267      *packet_count++;
   4.268    }
   4.269 @@ -412,6 +426,8 @@ XenNet_MakePackets(
   4.270    {
   4.271      put_page_on_freelist(xi, mdls[i];
   4.272    }
   4.273 +#endif
   4.274 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.275  }
   4.276  
   4.277  // Called at DISPATCH_LEVEL
   4.278 @@ -432,7 +448,7 @@ XenNet_RxBufferCheck(struct xennet_info 
   4.279    LARGE_INTEGER tsc, tsc2, dummy;
   4.280  #endif
   4.281    
   4.282 -//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.283 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.284  
   4.285  #if defined(XEN_PROFILE)
   4.286    tsc = tsc2 = KeQueryPerformanceCounter(&dummy);
   4.287 @@ -455,19 +471,19 @@ XenNet_RxBufferCheck(struct xennet_info 
   4.288        mdl = xi->rx_buffers[id];
   4.289        xi->rx_buffers[id] = NULL;
   4.290        xi->rx_id_free++;
   4.291 -      if (xi->rx.extra_info)
   4.292 +      if (xi->rxpi.extra_info)
   4.293        {
   4.294          put_page_on_freelist(xi, mdl);
   4.295          ei = (struct netif_extra_info *)RING_GET_RESPONSE(&xi->rx, cons);
   4.296 -        xi->rx.extra_info = !!(ei->flags & XEN_NETIF_EXTRA_FLAG_MORE);
   4.297 +        xi->rxpi.extra_info = !!(ei->flags & XEN_NETIF_EXTRA_FLAG_MORE);
   4.298          switch (ei->type)
   4.299          {
   4.300          case XEN_NETIF_EXTRA_TYPE_GSO:
   4.301            switch (ei->u.gso.type)
   4.302            {
   4.303            case XEN_NETIF_GSO_TYPE_TCPV4:
   4.304 -            xi->rx.mss = (PVOID)(xen_ulong_t)(ei->u.gso.size);
   4.305 -            ASSERT(header_len + xi->rx.mss <= PAGE_SIZE); // this limits MTU to PAGE_SIZE - XN_HEADER_LEN
   4.306 +            xi->rxpi.mss = (PVOID)(xen_ulong_t)(ei->u.gso.size);
   4.307 +            // TODO - put this assertion somewhere ASSERT(header_len + xi->rxpi.mss <= PAGE_SIZE); // this limits MTU to PAGE_SIZE - XN_HEADER_LEN
   4.308              break;
   4.309            default:
   4.310              KdPrint((__DRIVER_NAME "     Unknown GSO type (%d) detected\n", ei->u.gso.type));
   4.311 @@ -491,31 +507,31 @@ XenNet_RxBufferCheck(struct xennet_info 
   4.312            continue;
   4.313          }
   4.314          ASSERT(rxrsp->id == id);
   4.315 -        if (!xi->rx.more_frags) // handling the packet's 1st buffer
   4.316 +        if (!xi->rxpi.more_frags) // handling the packet's 1st buffer
   4.317          {
   4.318            
   4.319            if (rxrsp->flags & (NETRXF_csum_blank|NETRXF_data_validated) && xi->config_csum) // and we are enabled for offload...
   4.320            {
   4.321              //KdPrint((__DRIVER_NAME "     RX csum blank = %d, validated = %d\n", !!(rxrsp->flags & NETRXF_csum_blank), !!(rxrsp->flags & NETRXF_data_validated)));
   4.322              if (rxrsp->flags & NETRXF_csum_blank)
   4.323 -              xi->rx.csum_calc_required = TRUE;
   4.324 +              xi->rxpi.csum_calc_required = TRUE;
   4.325              #if defined(XEN_PROFILE)
   4.326              ProfCount_RxPacketsCsumOffload++;
   4.327              #endif
   4.328            }
   4.329          }
   4.330          NdisAdjustBufferLength(mdl, rxrsp->status);
   4.331 -        xi->rx.mdls[mdl_count++] = mdl;
   4.332 -        xi->rx.extra_info = !!(rxrsp->flags & NETRXF_extra_info);
   4.333 -        xi->rx.more_frags = !!(rxrsp->flags & NETRXF_more_data);
   4.334 -        xi->rx.total_length += rxrsp->status;
   4.335 +        xi->rxpi.mdls[xi->rxpi.mdl_count++] = mdl;
   4.336 +        xi->rxpi.extra_info = !!(rxrsp->flags & NETRXF_extra_info);
   4.337 +        xi->rxpi.more_frags = !!(rxrsp->flags & NETRXF_more_data);
   4.338 +        xi->rxpi.total_length += rxrsp->status;
   4.339        }
   4.340  
   4.341        /* Packet done, add it to the list */
   4.342 -      if (!xi->rx.more_frags && !xi->rx.extra_info)
   4.343 +      if (!xi->rxpi.more_frags && !xi->rxpi.extra_info)
   4.344        {
   4.345 -        XenNet_MakePackets(xi, packets, &packet_count)
   4.346 -        RtlZeroMemory(xi->rx, sizeof(xi->rx));
   4.347 +        XenNet_MakePackets(xi, packets, &packet_count);
   4.348 +        RtlZeroMemory(&xi->rxpi, sizeof(xi->rxpi));
   4.349          packet_count++;
   4.350        }
   4.351      }
   4.352 @@ -542,7 +558,7 @@ XenNet_RxBufferCheck(struct xennet_info 
   4.353  #endif
   4.354    }
   4.355  
   4.356 -//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.357 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.358  
   4.359  #if defined(XEN_PROFILE)
   4.360    ProfTime_RxBufferCheck.QuadPart += KeQueryPerformanceCounter(&dummy).QuadPart - tsc.QuadPart;
   4.361 @@ -568,7 +584,7 @@ XenNet_ReturnPacket(
   4.362    LARGE_INTEGER tsc, dummy;
   4.363  #endif
   4.364  
   4.365 -//  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.366 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.367  
   4.368  #if defined(XEN_PROFILE)
   4.369    tsc = KeQueryPerformanceCounter(&dummy);
   4.370 @@ -589,7 +605,7 @@ XenNet_ReturnPacket(
   4.371  
   4.372    KeReleaseSpinLockFromDpcLevel(&xi->rx_lock);
   4.373    
   4.374 -//  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.375 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
   4.376  
   4.377  #if defined(XEN_PROFILE)
   4.378    ProfTime_ReturnPacket.QuadPart += KeQueryPerformanceCounter(&dummy).QuadPart - tsc.QuadPart;
   4.379 @@ -627,10 +643,6 @@ XenNet_RxInit(xennet_info_t *xi)
   4.380  
   4.381    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
   4.382  
   4.383 -  xi->page_free = 0;
   4.384 -  xi->rx_current_packet = NULL;
   4.385 -  xi->rx_extra_info = 0;
   4.386 -  
   4.387    xi->rx_mdl = AllocatePage();
   4.388    xi->rx_pgs = MmGetMdlVirtualAddress(xi->rx_mdl);
   4.389    SHARED_RING_INIT(xi->rx_pgs);