]> xenbits.xensource.com Git - people/pauldu/xennet.git/commitdiff
Remove update of defunct statistic
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 17 Aug 2016 10:22:29 +0000 (11:22 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Wed, 17 Aug 2016 11:25:01 +0000 (12:25 +0100)
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 <paul.durrant@citrix.com>
src/xennet/receiver.c

index ba05799d254beb02c5dd2218f2b034aa6daef87d..693d1acafe9abefa9735dccb9afa60e4a689187b 100644 (file)
@@ -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,