win-pvdrivers

changeset 674:27ac5655ce9a 0.10.0.122

Fix tcp offload issue
author James Harper <james.harper@bendigoit.com.au>
date Wed Oct 07 14:16:45 2009 +1100 (2009-10-07)
parents e5522de3be37
children e4c29ebcc114
files xennet/xennet_tx.c
line diff
     1.1 --- a/xennet/xennet_tx.c	Wed Oct 07 14:16:21 2009 +1100
     1.2 +++ b/xennet/xennet_tx.c	Wed Oct 07 14:16:45 2009 +1100
     1.3 @@ -169,7 +169,7 @@ XenNet_HWSendPacket(struct xennet_info *
     1.4      
     1.5    mss = PtrToUlong(NDIS_PER_PACKET_INFO_FROM_PACKET(packet, TcpLargeSendPacketInfo));
     1.6  
     1.7 -  if (mss)
     1.8 +  if (mss && parse_result == PARSE_OK)
     1.9    {
    1.10      if (NDIS_GET_PACKET_PROTOCOL_TYPE(packet) != NDIS_PROTOCOL_ID_TCP_IP)
    1.11      {
    1.12 @@ -216,22 +216,15 @@ XenNet_HWSendPacket(struct xennet_info *
    1.13    
    1.14    if (ndis_lso)
    1.15    {    
    1.16 -    if (parse_result == PARSE_OK)
    1.17 +    flags |= NETTXF_csum_blank | NETTXF_data_validated; /* these may be implied but not specified when lso is used*/
    1.18 +    if (pi.tcp_length >= mss)
    1.19      {
    1.20 -      flags |= NETTXF_csum_blank | NETTXF_data_validated; /* these may be implied but not specified when lso is used*/
    1.21 -      if (pi.tcp_length >= mss)
    1.22 -      {
    1.23 -        flags |= NETTXF_extra_info;
    1.24 -        xen_gso = TRUE;
    1.25 -      }
    1.26 -      else
    1.27 -      {
    1.28 -        KdPrint((__DRIVER_NAME "     large send specified when tcp_length < mss\n"));
    1.29 -      }
    1.30 +      flags |= NETTXF_extra_info;
    1.31 +      xen_gso = TRUE;
    1.32      }
    1.33      else
    1.34      {
    1.35 -        KdPrint((__DRIVER_NAME "     could not parse packet - no large send offload done\n"));
    1.36 +      KdPrint((__DRIVER_NAME "     large send specified when tcp_length < mss\n"));
    1.37      }
    1.38    }
    1.39