Changeset 32338 in vbox
- Timestamp:
- Sep 9, 2010 11:12:45 AM (14 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt/win
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h
r29682 r32338 366 366 /** number of packets in the aReceivedPackets array*/ 367 367 ULONG cReceivedPacketCount; 368 /** flag indicating whether rx packet queueing is allowed */ 369 BOOLEAN bIsReceivePacketQueueingDisabled; 368 370 /** packet filter flags set by the upper protocols */ 369 371 ULONG fUpperProtocolSetFilter; -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
r29616 r32338 328 328 329 329 pAdapt->cReceivedPacketCount = 0; 330 /* reset the value in case */ 331 pAdapt->bIsReceivePacketQueueingDisabled = FALSE; 330 332 ReturnPackets = TRUE; 331 333 } … … 876 878 */ 877 879 878 if ((pAdapt->cReceivedPacketCount == MAX_RECEIVE_PACKET_ARRAY_SIZE) || DoIndicate || bReturn) 880 if ((pAdapt->cReceivedPacketCount == MAX_RECEIVE_PACKET_ARRAY_SIZE) || DoIndicate || bReturn 881 || pAdapt->bIsReceivePacketQueueingDisabled) 879 882 { 880 883 NdisMoveMemory(PacketArray, … … 891 894 { 892 895 DoIndicate = TRUE; 896 pAdapt->bIsReceivePacketQueueingDisabled = TRUE; 893 897 } 894 898 } … … 900 904 if(DoIndicate) 901 905 { 906 /* the tcp stack can send ACK packets right in the context of its PtReceive for this packet, 907 * and thoose (tcp-sent) packets can be looped back again. 908 * If this happens there is a possibility that new RX packets are received by us 909 * after we do this NdisMIndicateReceivePacket and before we do a new NdisMIndicateReceivePacket 910 * for the looped back tcp-sent packet. 911 * If we queue those newly received packets and indicate them together with the looped back packet 912 * with the latter NdisMIndicateReceivePacket, we may end up tcp stack sending ACKs in the context of its PtReceive again. 913 * Thus this may lead to stack overflows on a heavy network loads. 914 * To prevent this we disable the RX packet queuing when we do NdisMIndicateReceivePacket here, 915 * thus if new packets arrive to us in another thread, we simply indicate them up instead of queuing them. 916 * */ 917 Assert(pAdapt->bIsReceivePacketQueueingDisabled); 902 918 NdisMIndicateReceivePacket(pAdapt->hMiniportHandle, PacketArray, NumberOfPackets); 919 RTSpinlockAcquireNoInts(pNetFlt->hSpinlock, &Tmp); 920 pAdapt->bIsReceivePacketQueueingDisabled = FALSE; 921 RTSpinlockReleaseNoInts(pNetFlt->hSpinlock, &Tmp); 903 922 } 904 923 }
Note:
See TracChangeset
for help on using the changeset viewer.