netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: <xen-devel@lists.xen.org>, <netdev@vger.kernel.org>
Cc: <jajcus@jajcus.net>, Wei Liu <wei.liu2@citrix.com>,
	Paul Durrant <paul.durrant@citrix.com>
Subject: [PATCH net V2] xen-netback: don't move event pointer in TX credit timeout callback
Date: Thu, 15 May 2014 12:59:18 +0100	[thread overview]
Message-ID: <1400155158-13527-1-git-send-email-wei.liu2@citrix.com> (raw)

... 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).

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);
-- 
1.7.10.4

             reply	other threads:[~2014-05-15 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 11:59 Wei Liu [this message]
2014-05-15 13:04 ` [PATCH net V2] xen-netback: don't move event pointer in TX credit timeout callback 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 ` [Xen-devel] " David Vrabel
2014-05-15 13:59   ` 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=1400155158-13527-1-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=jajcus@jajcus.net \
    --cc=netdev@vger.kernel.org \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).