[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH 2/2] Logging and barrier changes in ReceiverWaitForPackets()



Modifications for bug diagnosis

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenvif/receiver.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c
index 25bf40a..196a4c1 100644
--- a/src/xenvif/receiver.c
+++ b/src/xenvif/receiver.c
@@ -3646,13 +3646,14 @@ ReceiverWaitForPackets(
 
     Frontend = Receiver->Frontend;
 
+    Info("%s: ====>\n", FrontendGetPath(Frontend));
+
     Returned = Receiver->Returned;
 
     // Make sure Loaned is not sampled before Returned
     KeMemoryBarrier();
 
     Loaned = Receiver->Loaned;
-
     ASSERT3S(Loaned - Returned, >=, 0);
 
     Timeout.QuadPart = 
TIME_RELATIVE(TIME_S(XENVIF_RECEIVER_PACKET_WAIT_PERIOD));
@@ -3660,8 +3661,8 @@ ReceiverWaitForPackets(
     while (Returned != Loaned) {
         Info("%s: (Loaned = %d Returned = %d)\n",
              FrontendGetPath(Frontend),
-             Receiver->Loaned,
-             Receiver->Returned);
+             Loaned,
+             Returned);
 
         (VOID) KeWaitForSingleObject(&Receiver->Event,
                                      Executive,
@@ -3671,9 +3672,12 @@ ReceiverWaitForPackets(
         KeClearEvent(&Receiver->Event);
 
         Returned = Receiver->Returned;
+        KeMemoryBarrier();
+
+        ASSERT3S(Loaned, ==, Receiver->Loaned);
     }
 
-    Info("%s: done\n", FrontendGetPath(Frontend));
+    Info("%s: <====\n", FrontendGetPath(Frontend));
 }
 
 VOID
-- 
2.5.3


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.