Author: cgutman
Date: Wed Apr 29 02:04:12 2009
New Revision: 40721
URL:
http://svn.reactos.org/svn/reactos?rev=40721&view=rev
Log:
- Only call NdisMEthIndicateReceiveComplete once per batch of packets
- Slight performance increase
Modified:
trunk/reactos/drivers/network/dd/pcnet/pcnet.c
Modified: trunk/reactos/drivers/network/dd/pcnet/pcnet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/dd/pcnet/p…
==============================================================================
--- trunk/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] Wed Apr 29 02:04:12 2009
@@ -95,6 +95,8 @@
}
if(Data & CSR0_RINT)
{
+ BOOLEAN IndicatedData = FALSE;
+
DPRINT("receive interrupt\n");
while(1)
@@ -135,7 +137,8 @@
DPRINT("Indicating a %d-byte packet (index %d)\n", ByteCount,
Adapter->CurrentReceiveDescriptorIndex);
NdisMEthIndicateReceive(Adapter->MiniportAdapterHandle, 0, Buffer, 14,
Buffer+14, ByteCount-14, ByteCount-14);
- NdisMEthIndicateReceiveComplete(Adapter->MiniportAdapterHandle);
+
+ IndicatedData = TRUE;
RtlZeroMemory(Descriptor, sizeof(RECEIVE_DESCRIPTOR));
Descriptor->RBADR =
@@ -148,6 +151,9 @@
Adapter->Statistics.RcvGoodFrames++;
}
+
+ if (IndicatedData)
+ NdisMEthIndicateReceiveComplete(Adapter->MiniportAdapterHandle);
}
if(Data & CSR0_TINT)
{