From: Simon Horman <horms@verge.net.au>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest <lguest@ozlabs.org>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] virtio: fix net driver loop case where we fail to restart
Date: Tue, 20 Nov 2007 16:20:55 +0900 [thread overview]
Message-ID: <20071120072053.GF10490@verge.net.au> (raw)
In-Reply-To: <200711191120.15596.rusty@rustcorp.com.au>
On Mon, Nov 19, 2007 at 11:20:15AM +1100, Rusty Russell wrote:
> skb is only NULL the first time around: it's more correct to test for
> being under-budget.
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
That looks better to me.
Acked-by: Simon Horman <horms@verge.net.au>
> 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))
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Horms
prev parent reply other threads:[~2007-11-20 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 0:20 [PATCH 1/2] virtio: fix net driver loop case where we fail to restart Rusty Russell
[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-20 7:20 ` Simon Horman [this message]
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=20071120072053.GF10490@verge.net.au \
--to=horms@verge.net.au \
--cc=lguest@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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).