All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
To: lguest <lguest-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: [PATCH 1/2] virtio: fix net driver loop case where we fail to restart
Date: Mon, 19 Nov 2007 11:20:15 +1100	[thread overview]
Message-ID: <200711191120.15596.rusty@rustcorp.com.au> (raw)

skb is only NULL the first time around: it's more correct to test for
being under-budget.

Signed-off-by: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>

diff -r 2a94425ac7d5 drivers/net/virtio_net.c
--- a/drivers/net/virtio_net.c	Thu Nov 15 13:47:28 2007 +1100
+++ b/drivers/net/virtio_net.c	Thu Nov 15 23:10:44 2007 +1100
@@ -198,8 +198,8 @@ again:
 	if (vi->num < vi->max / 2)
 		try_fill_recv(vi);
 
-	/* All done? */
-	if (!skb) {
+	/* Out of packets? */
+	if (received < budget) {
 		netif_rx_complete(vi->dev, napi);
 		if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq))
 		    && netif_rx_reschedule(vi->dev, napi))

             reply	other threads:[~2007-11-19  0:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19  0:20 Rusty Russell [this message]
     [not found] ` <200711191120.15596.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2007-11-19  0:25   ` [PATCH 2/2] virtio: free transmit skbs when notified, not on next xmit Rusty Russell
2007-11-19 10:31     ` Christian Borntraeger
2007-11-19 10:31     ` Christian Borntraeger
2007-11-19  0:25 ` Rusty Russell
2007-11-20  7:20 ` [PATCH 1/2] virtio: fix net driver loop case where we fail to restart Simon Horman
2007-11-20  7:20 ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2007-11-19  0:20 Rusty Russell

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=200711191120.15596.rusty@rustcorp.com.au \
    --to=rusty-8n+1lvoiyb80n/f98k4iww@public.gmane.org \
    --cc=lguest-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.