From: Paul Durrant Date: Wed, 17 Aug 2016 10:22:29 +0000 (+0100) Subject: Remove update of defunct statistic X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=50aa36a8ac5ac7907b73d6ecbe98fbcebea108fc;p=people%2Fpauldu%2Fxennet.git Remove update of defunct statistic Nothing looks a the 'InNDISMax' value, yet the receiver code still jumps through potentially performance damaging hoops to update it. This patch finally blows it away. Signed-off-by: Paul Durrant --- diff --git a/src/xennet/receiver.c b/src/xennet/receiver.c index ba05799..693d1ac 100644 --- a/src/xennet/receiver.c +++ b/src/xennet/receiver.c @@ -46,7 +46,6 @@ struct _XENNET_RECEIVER { PNET_BUFFER_LIST PutList; PNET_BUFFER_LIST GetList[HVM_MAX_VCPUS]; LONG InNDIS; - LONG InNDISMax; XENVIF_VIF_OFFLOAD_OPTIONS OffloadOptions; }; @@ -287,19 +286,6 @@ __ReceiverPushPacket( if (InNDIS > IN_NDIS_MAX) Flags |= NDIS_RECEIVE_FLAGS_RESOURCES; - for (;;) { - LONG InNDISMax; - - InNDISMax = Receiver->InNDISMax; - KeMemoryBarrier(); - - if (InNDIS <= InNDISMax) - break; - - if (InterlockedCompareExchange(&Receiver->InNDISMax, InNDIS, InNDISMax) == InNDISMax) - break; - } - NdisMIndicateReceiveNetBufferLists(AdapterGetHandle(Receiver->Adapter), NetBufferList, NDIS_DEFAULT_PORT_NUMBER,