[prev in list] [next in list] [prev in thread] [next in thread]
List: win-pv-devel
Subject: Re: [PATCH 2/5] Log ring disable.
From: Paul Durrant <xadimgnik () gmail ! com>
Date: 2021-08-05 18:19:22
Message-ID: ed28beeb-c329-935d-5f1a-e50d9356b069 () xen ! org
[Download RAW message or body]
On 28/07/2021 15:02, Martin Harvey wrote:
> Since Rx/Tx ring disconnects now no longer wait forever, we add
> some logging to catch those cases where the disconnect has timed out,
> indicating how many requests are still in the ring.
>
> This aids greatly with customer debugging.
>
> Signed-off-by: Martin Harvey <martin.harvey@citrix.com>
I asked for use of
XENBUS_DEBUG(Trigger,
&Transmitter->DebugInterface,
Ring->DebugCallback);
rather than more ad-hoc logging. Is there a reason that won't work?
Paul
> ---
> src/xenvif/receiver.c | 16 ++++++++++++++++
> src/xenvif/transmitter.c | 6 ++++++
> 2 files changed, 22 insertions(+)
>
> diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c
> index c70d938..7295646 100644
> --- a/src/xenvif/receiver.c
> +++ b/src/xenvif/receiver.c
> @@ -2887,6 +2887,22 @@ __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))
> + {
> + Info("%s[%u]: Ring disconnect, counts do not match.\n",
> + FrontendGetPath(Frontend),
> + Ring->Index);
> +
> + Info("%s[%u]: Processed: %u Pushed: %u Posted: %u\n",
> + FrontendGetPath(Frontend),
> + Ring->Index,
> + Ring->ResponsesProcessed,
> + Ring->RequestsPushed,
> + Ring->RequestsPosted);
> + }
> +
> Ring->ResponsesProcessed = 0;
> Ring->RequestsPushed = 0;
> Ring->RequestsPosted = 0;
> diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
> index fddeb0c..47f2fc2 100644
> --- a/src/xenvif/transmitter.c
> +++ b/src/xenvif/transmitter.c
> @@ -4005,6 +4005,12 @@ __TransmitterRingDisable(
> }
> if (Ring->ResponsesProcessed != Ring->RequestsPushed)
> {
> + Info("%s[%u]: Timed out disable: Requests pushed: %u, Responses processed: %u.\n",
> + FrontendGetPath(Frontend),
> + Ring->Index,
> + Ring->RequestsPushed,
> + Ring->ResponsesProcessed);
> +
> __TransmitterRingFakeResponses(Ring);
> (VOID) TransmitterRingPoll(Ring);
> }
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic