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

Re: [PATCH] Add ring disconnect logging.


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Paul Durrant <xadimgnik@xxxxxxxxx>
  • Date: Fri, 20 Aug 2021 09:16:30 +0100
  • Delivery-date: Fri, 20 Aug 2021 08:16:34 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 17/08/2021 09:33, Martin Harvey wrote:
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);
+    }

No need for the braces, but I can clean that up on commit.

Acked-by: Paul Durrant <paul@xxxxxxx>

+
      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);
      }





 


Rackspace

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