All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
Subject: Re: [PATCH] Use guards in virtio-net for easier upstream merging
Date: Thu, 04 Dec 2008 12:06:48 +0000	[thread overview]
Message-ID: <1228392408.3732.72.camel@blaa> (raw)
In-Reply-To: <1228336330-25664-1-git-send-email-aliguori@us.ibm.com>

On Wed, 2008-12-03 at 14:32 -0600, Anthony Liguori wrote:

> @@ -189,6 +205,9 @@ static void virtio_net_receive(void *opaque, const uint8_t *buf, int size)
>      struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL;
>      int hdr_len, offset, i;
>  
> +    if (!virtio_net_can_receive(opaque))
> +        return;

Should pass the buffer size to virtio_net_can_receive() to limit the
work virtqueue_avail_bytes() has to do.

Cheers,
Mark.


  reply	other threads:[~2008-12-04 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 20:32 [PATCH] Use guards in virtio-net for easier upstream merging Anthony Liguori
2008-12-04 12:06 ` Mark McLoughlin [this message]
2008-12-04 15:09   ` Anthony Liguori

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=1228392408.3732.72.camel@blaa \
    --to=markmc@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.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.