All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] virtio: fix net driver loop case where we fail to restart
@ 2007-11-19  0:20 Rusty Russell
  2007-11-19  0:25 ` [PATCH 2/2] virtio: free transmit skbs when notified, not on next xmit Rusty Russell
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rusty Russell @ 2007-11-19  0:20 UTC (permalink / raw)
  To: lguest
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-20  7:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-19  0:20 [PATCH 1/2] virtio: fix net driver loop case where we fail to restart Rusty Russell
2007-11-19  0:25 ` [PATCH 2/2] virtio: free transmit skbs when notified, not on next xmit Rusty Russell
     [not found] ` <200711191120.15596.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2007-11-19  0:25   ` Rusty Russell
2007-11-19 10:31     ` Christian Borntraeger
2007-11-19 10:31     ` Christian Borntraeger
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

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.