win-pvdrivers

changeset 437:3b1ba2d7056c

Linux doesn't do GSO with invalid tcp options apparantly, so don't support gso with tcp options at all
author James Harper <james.harper@bendigoit.com.au>
date Tue Nov 04 20:28:26 2008 +1100 (2008-11-04)
parents c4204f69c506
children f0fe409ae32e
files xennet/xennet_oid.c xennet/xennet_rx.c
line diff
     1.1 --- a/xennet/xennet_oid.c	Tue Nov 04 17:30:22 2008 +1100
     1.2 +++ b/xennet/xennet_oid.c	Tue Nov 04 20:28:26 2008 +1100
     1.3 @@ -343,8 +343,8 @@ XenNet_QueryInformation(
     1.4          nttls->Version = 0;
     1.5          nttls->MaxOffLoadSize = xi->config_gso;
     1.6          nttls->MinSegmentCount = MIN_LARGE_SEND_SEGMENTS;
     1.7 -        nttls->TcpOptions = TRUE;
     1.8 -        nttls->IpOptions = TRUE;
     1.9 +        nttls->TcpOptions = FALSE; /* linux can't handle this */
    1.10 +        nttls->IpOptions = FALSE; /* linux can't handle this */
    1.11          KdPrint(("&(nttls->IpOptions) = %p\n", &(nttls->IpOptions)));        
    1.12        }
    1.13  
    1.14 @@ -671,6 +671,20 @@ XenNet_SetInformation(
    1.15              nttls = NULL;
    1.16              break;
    1.17            }
    1.18 +          if (nttls->IpOptions)
    1.19 +          {
    1.20 +            KdPrint(("     IpOptions not supported\n"));
    1.21 +            status = NDIS_STATUS_INVALID_DATA;
    1.22 +            nttls = NULL;
    1.23 +            break;
    1.24 +          }
    1.25 +          if (nttls->TcpOptions)
    1.26 +          {
    1.27 +            KdPrint(("     TcpOptions not supported\n"));
    1.28 +            status = NDIS_STATUS_INVALID_DATA;
    1.29 +            nttls = NULL;
    1.30 +            break;
    1.31 +          }
    1.32            break;
    1.33          default:
    1.34            KdPrint(("     Unknown Task %d\n", nto->Task));
     2.1 --- a/xennet/xennet_rx.c	Tue Nov 04 17:30:22 2008 +1100
     2.2 +++ b/xennet/xennet_rx.c	Tue Nov 04 20:28:26 2008 +1100
     2.3 @@ -400,33 +400,6 @@ XenNet_MakePackets(
     2.4              csum_info->Receive.NdisPacketUdpChecksumFailed = TRUE;
     2.5          }
     2.6        }
     2.7 -#if 0      
     2.8 -      if (xi->rxpi.ip_proto == 17)
     2.9 -      {
    2.10 -        PMDL mdl;
    2.11 -        PVOID *addr;
    2.12 -        UINT buffer_length;
    2.13 -        UINT total_length;
    2.14 -        UINT calc_length = 0;
    2.15 -        NdisGetFirstBufferFromPacketSafe(packet, &mdl, &addr, &buffer_length, &total_length, NormalPagePriority);
    2.16 -        KdPrint((__DRIVER_NAME "     packet = %p\n", packet));
    2.17 -        KdPrint((__DRIVER_NAME "     total_length = %d\n", total_length));
    2.18 -        while (mdl)
    2.19 -        {
    2.20 -          NdisQueryBufferSafe(mdl, &addr, &buffer_length, NormalPagePriority);
    2.21 -          ASSERT(mdl != NULL);
    2.22 -          ASSERT(addr != NULL);
    2.23 -          ASSERT(buffer_length != 0);
    2.24 -          calc_length += buffer_length;
    2.25 -          KdPrint((__DRIVER_NAME "     mdl = %p\n", mdl));
    2.26 -          KdPrint((__DRIVER_NAME "     addr = %p\n", addr));
    2.27 -          KdPrint((__DRIVER_NAME "     buffer_length = %d\n", buffer_length));
    2.28 -          KdPrint((__DRIVER_NAME "     calc_length = %d\n", calc_length));
    2.29 -          NdisGetNextBuffer(mdl, &mdl);
    2.30 -        }
    2.31 -        ASSERT(calc_length == total_length);
    2.32 -      }      
    2.33 -#endif
    2.34      }
    2.35      entry = (PLIST_ENTRY)&packet->MiniportReservedEx[sizeof(PVOID)];
    2.36      InsertTailList(rx_packet_list, entry);