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

[PATCH] Add ring disconnect logging.


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <Martin.Harvey@xxxxxxxxxx>
  • Date: Tue, 17 Aug 2021 09:33:04 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Martin Harvey <Martin.Harvey@xxxxxxxxxx>, Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Delivery-date: Tue, 17 Aug 2021 08:33:20 +0000
  • Ironport-hdrordr: A9a23:9salQK2sbBX4Yu+LiCIlKwqjBLwkLtp133Aq2lEZdPRUGvb4qy nIpoV96faUskdpZJhOo6HiBEDtexzhHP1OkO0s1NWZLWvbUQKTRekIh+aP/9SJIVyZygc378 ddmsZFZuEYdWIK6PrH3A==
  • Ironport-sdr: cFLhtaCNmo/N402RVzZnLQ2+DX/CdKGO6CfRzW+sdRGiNRQsV38EQHddim120OLzPSG3//wwD2 2hIxZBl9rg85E2Rk2macwC5Hz39cedrnFgR3MCgXx657Ki00HeDXZ1T9FTvqUUMhbiOsNjzIot gsTlMJyYTMUkX3GolOIeX3MiVSfPcv9LtdnBDNBBmi8BFAMgVI4i281rEG+NA+T/kJb+3Odai6 4V2IzLlfCqe/Is2b+WrUGZEMzjXUA4wzr6Q291kA/y4xZauAsvFtZw6d7iRNTz+eCdwcOxHow+ //7cXSi69aRb58X9lqxGPdZX
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Logging to note error cases which would otherwise be silent in release builds.
This aids greatly with customer debugging.

Signed-off-by: Martin Harvey <martin.harvey@xxxxxxxxxx>
---
 src/xenvif/receiver.c    | 9 +++++++++
 src/xenvif/transmitter.c | 4 ++++
 2 files changed, 13 insertions(+)

diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c
index c70d938..123b2d7 100644
--- a/src/xenvif/receiver.c
+++ b/src/xenvif/receiver.c
@@ -2887,6 +2887,15 @@ __ReceiverRingDisconnect(
     ASSERT3U(Ring->ResponsesProcessed, ==, Ring->RequestsPushed);
     ASSERT3U(Ring->RequestsPushed, ==, Ring->RequestsPosted);
 
+    //Debug logs as well as assertion, else customer debugging difficult.
+    if ((Ring->ResponsesProcessed != Ring->RequestsPushed) ||
+        (Ring->RequestsPushed != Ring->RequestsPosted))
+    {
+        XENBUS_DEBUG(Trigger,
+                    &Receiver->DebugInterface,
+                    Ring->DebugCallback);
+    }
+
     Ring->ResponsesProcessed = 0;
     Ring->RequestsPushed = 0;
     Ring->RequestsPosted = 0;
diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index de9b476..abda21b 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -4005,6 +4005,10 @@ __TransmitterRingDisable(
     }
     if (Ring->ResponsesProcessed != Ring->RequestsPushed)
     {
+        XENBUS_DEBUG(Trigger,
+                    &Transmitter->DebugInterface,
+                    Ring->DebugCallback);
+
         __TransmitterRingFakeResponses(Ring);
         (VOID) TransmitterRingPoll(Ring);
     }
-- 
2.25.0.windows.1




 


Rackspace

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