win-pvdrivers

changeset 249:1e47fb7bce04

Changes for debugging and testing
author James Harper <james.harper@bendigoit.com.au>
date Tue Apr 08 19:51:19 2008 +1000 (2008-04-08)
parents 7c395bd04ec1
children 532d7485ddf2
files common.inc xennet/xennet.h xennet/xennet_rx.c xennet/xennet_tx.c
line diff
     1.1 --- a/common.inc	Sat Apr 05 23:32:53 2008 +1100
     1.2 +++ b/common.inc	Tue Apr 08 19:51:19 2008 +1000
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.8.8.26
     1.5 +VERSION=0.8.8.34
     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 Apr 05 23:32:53 2008 +1100
     2.2 +++ b/xennet/xennet.h	Tue Apr 08 19:51:19 2008 +1000
     2.3 @@ -84,6 +84,7 @@ Foundation, Inc., 51 Franklin Street, Fi
     2.4  #pragma warning(disable: 4127) // conditional expression is constant
     2.5  
     2.6  //#define XEN_PROFILE
     2.7 +
     2.8  #define MIN_LARGE_SEND_SEGMENTS 4
     2.9  
    2.10  /* TODO: crank this up if we support higher mtus? */
     3.1 --- a/xennet/xennet_rx.c	Sat Apr 05 23:32:53 2008 +1100
     3.2 +++ b/xennet/xennet_rx.c	Tue Apr 08 19:51:19 2008 +1000
     3.3 @@ -169,6 +169,7 @@ XenNet_SumPacketData(
     3.4    PUSHORT csum_ptr;
     3.5    USHORT remaining;
     3.6    USHORT ip4_length;
     3.7 +ULONG seq;
     3.8  
     3.9  //  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    3.10  
    3.11 @@ -206,6 +207,7 @@ XenNet_SumPacketData(
    3.12    csum += GET_NET_USHORT(buffer[XN_HDR_SIZE + 16]) + GET_NET_USHORT(buffer[XN_HDR_SIZE + 18]); // dst
    3.13    csum += ((USHORT)buffer[XN_HDR_SIZE + 9]);
    3.14  
    3.15 +seq = GET_NET_ULONG(buffer[XN_HDR_SIZE + pi->ip4_header_length + 4]);
    3.16    remaining = ip4_length - pi->ip4_header_length;
    3.17  
    3.18    csum += remaining;
    3.19 @@ -222,7 +224,7 @@ XenNet_SumPacketData(
    3.20          return;
    3.21        }
    3.22        NdisQueryBufferSafe(mdl, &buffer, &buffer_length, NormalPagePriority);
    3.23 -//      KdPrint((__DRIVER_NAME "     New buffer - unaligned...\n"));
    3.24 +//KdPrint((__DRIVER_NAME "     New buffer - unaligned... seq = %x\n", seq));
    3.25        csum += ((USHORT)buffer[0]);
    3.26        buffer_offset = (USHORT)-1;
    3.27      }
    3.28 @@ -245,6 +247,7 @@ XenNet_SumPacketData(
    3.29    }
    3.30    if (i != total_length) // last odd byte
    3.31    {
    3.32 +//    KdPrint((__DRIVER_NAME "     odd final byte... seq = %x\n", seq));
    3.33      csum += ((USHORT)buffer[buffer_offset] << 8);
    3.34    }
    3.35    while (csum & 0xFFFF0000)
    3.36 @@ -323,6 +326,7 @@ XenNet_MakePackets(
    3.37  )
    3.38  {
    3.39    USHORT i;
    3.40 +  int pc;
    3.41  
    3.42  //  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "(packets = %p, packet_count = %d)\n", packets, *packet_count_p));
    3.43  
    3.44 @@ -353,14 +357,17 @@ XenNet_MakePackets(
    3.45    else
    3.46      xi->rxpi.curr_mdl = 1;
    3.47  
    3.48 +pc = 0;
    3.49    while (xi->rxpi.tcp_remaining)
    3.50    {
    3.51  //    KdPrint((__DRIVER_NAME "     tcp_remaining = %d\n", xi->rxpi.tcp_remaining));
    3.52      packets[*packet_count_p] = XenNet_MakePacket(xi);
    3.53      XenNet_SumPacketData(&xi->rxpi, packets[*packet_count_p]);
    3.54      (*packet_count_p)++;
    3.55 +pc++;
    3.56    }
    3.57    ASSERT(xi->rxpi.curr_mdl == xi->rxpi.mdl_count);
    3.58 +//KdPrint((__DRIVER_NAME "     split %d bytes into %d packets\n", xi->rxpi.tcp_length, pc));
    3.59  //  KdPrint((__DRIVER_NAME "     tcp_remaining = %d\n", xi->rxpi.tcp_remaining));
    3.60    // TODO: restore psh status to last packet
    3.61    for (i = 0; i < xi->rxpi.mdl_count; i++)
     4.1 --- a/xennet/xennet_tx.c	Sat Apr 05 23:32:53 2008 +1100
     4.2 +++ b/xennet/xennet_tx.c	Tue Apr 08 19:51:19 2008 +1000
     4.3 @@ -578,6 +578,7 @@ XenNet_TxShutdown(xennet_info_t *xi)
     4.4    xi->tx_pgs = NULL;
     4.5  
     4.6    /* I think that NDIS takes care of this for us... */
     4.7 +  /* no it doesn't - this needs handling properly */
     4.8    ASSERT(xi->tx_outstanding == 0);
     4.9  
    4.10    for (i = 0; i < NET_TX_RING_SIZE; i++)