public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix•com>
To: Wei Liu <wei.liu2@citrix•com>, <xen-devel@lists•xen.org>,
	<netdev@vger•kernel.org>
Cc: Paul Durrant <paul.durrant@citrix•com>, <jajcus@jajcus•net>
Subject: Re: [Xen-devel] [PATCH net V2] xen-netback: don't move event pointer in TX credit timeout callback
Date: Thu, 15 May 2014 14:40:58 +0100	[thread overview]
Message-ID: <5374C3EA.1080807@citrix.com> (raw)
In-Reply-To: <1400155158-13527-1-git-send-email-wei.liu2@citrix.com>

On 15/05/14 12:59, Wei Liu wrote:
> ... otherwise the frontend will try to send TX event all the time, even
> if no progress can be made. The pointer should only be advanced by the
> routine that actually processes the ring (that is, xenvif_poll).

No it does not.  RING_FINAL_CHECK_FOR_REQUESTS() only advances the event
index if the ring is empty.

This will also result in xenvif_up() failing to properly enable the event.

I think Jacek's bug may be that netback fails to call napi_complete()
when credit is exceeded and there still outstanding requests on the
from-guest ring and thus napi repeatedly polls.

David

> 
> Reported-by: Jacek Konieczny <jajcus@jajcus•net>
> Signed-off-by: Wei Liu <wei.liu2@citrix•com>
> Acked-by: Ian Campbell <ian.campbell@citrix•com>
> Cc: Paul Durrant <paul.durrant@citrix•com>
> ---
>  drivers/net/xen-netback/netback.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 7666540..8e2cbeb 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -658,7 +658,7 @@ void xenvif_check_rx_xenvif(struct xenvif *vif)
>  {
>  	int more_to_do;
>  
> -	RING_FINAL_CHECK_FOR_REQUESTS(&vif->tx, more_to_do);
> +	more_to_do = RING_HAS_UNCONSUMED_REQUESTS(&vif->tx);
>  
>  	if (more_to_do)
>  		napi_schedule(&vif->napi);
> 

  parent reply	other threads:[~2014-05-15 13:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 11:59 [PATCH net V2] xen-netback: don't move event pointer in TX credit timeout callback Wei Liu
2014-05-15 13:04 ` Jacek Konieczny
2014-05-15 13:33   ` Wei Liu
2014-05-15 13:58   ` Wei Liu
2014-05-15 14:13   ` Wei Liu
2014-05-15 14:47     ` Zoltan Kiss
2014-05-15 15:30       ` Wei Liu
2014-05-15 16:34         ` Zoltan Kiss
2014-05-15 16:53           ` Wei Liu
2014-05-15 17:03             ` Zoltan Kiss
2014-05-15 18:16               ` Wei Liu
2014-05-15 13:40 ` David Vrabel [this message]
2014-05-15 13:59   ` [Xen-devel] " Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5374C3EA.1080807@citrix.com \
    --to=david.vrabel@citrix$(echo .)com \
    --cc=jajcus@jajcus$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=paul.durrant@citrix$(echo .)com \
    --cc=wei.liu2@citrix$(echo .)com \
    --cc=xen-devel@lists$(echo .)xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox