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

[win-pv-devel] [PATCH] Log how many packets are aborted



When the transmitter rings are shut down, packets in the queues are
aborted. This patch adds a log line saying how many packets were
aborted in each queue.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenvif/transmitter.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index 82ef271..e4e3c31 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -4209,10 +4209,18 @@ __TransmitterRingAbortPackets(
     IN  PXENVIF_TRANSMITTER_RING    Ring
     )
 {
+    PXENVIF_TRANSMITTER             Transmitter;
+    PXENVIF_FRONTEND                Frontend;
+    ULONG                           Count;
+
+    Transmitter = Ring->Transmitter;
+    Frontend = Transmitter->Frontend;
+
     __TransmitterRingAcquireLock(Ring);
 
     TransmitterRingSwizzle(Ring);
 
+    Count = 0;
     while (!IsListEmpty(&Ring->PacketQueue)) {
         PLIST_ENTRY                 ListEntry;
         PXENVIF_TRANSMITTER_PACKET  Packet;
@@ -4231,8 +4239,13 @@ __TransmitterRingAbortPackets(
         Packet->Completion.Status = XENVIF_TRANSMITTER_PACKET_DROPPED;
 
         __TransmitterRingCompletePacket(Ring, Packet);
+        Count++;
     }
 
+    Info("%s: aborted %u packets\n",
+         FrontendGetPath(Frontend),
+         Count);
+
     ASSERT3U(Ring->PacketsSent, ==, Ring->PacketsPrepared - 
Ring->PacketsUnprepared);
     ASSERT3U(Ring->PacketsPrepared, ==, Ring->PacketsCopied + 
Ring->PacketsGranted + Ring->PacketsFaked);
     ASSERT3U(Ring->PacketsQueued, ==, Ring->PacketsPrepared - 
Ring->PacketsUnprepared);
-- 
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®.