From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty
Date: Fri, 30 May 2008 10:59:48 +0200 [thread overview]
Message-ID: <200805301059.48462.borntraeger@de.ibm.com> (raw)
In-Reply-To: <200805301512.07802.rusty@rustcorp.com.au>
Am Freitag, 30. Mai 2008 schrieb Rusty Russell:
> It turns out that life is simpler if the host similarly ignores
> callback suppression when the ring is completely empty: the network
> driver wants to free up old packets in a timely manner, and otherwise
> has to use a timer to poll.
>
> We have to remove the code which ignores interrupts when the driver
> has disabled them (again, it had no locking and hence was unreliable
> anyway).
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> ---
> drivers/virtio/virtio_ring.c | 7 -------
> include/linux/virtio_config.h | 4 ++++
> 2 files changed, 4 insertions(+), 7 deletions(-)
>
> diff -r 95a02f0e0e21 drivers/virtio/virtio_ring.c
> --- a/drivers/virtio/virtio_ring.c Tue May 27 12:45:17 2008 +1000
> +++ b/drivers/virtio/virtio_ring.c Tue May 27 15:53:41 2008 +1000
> @@ -253,13 +253,6 @@ irqreturn_t vring_interrupt(int irq, voi
> if (unlikely(vq->broken))
> return IRQ_HANDLED;
>
> - /* Other side may have missed us turning off the interrupt,
> - * but we should preserve disable semantic for virtio users. */
> - if (unlikely(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) {
> - pr_debug("virtqueue interrupt after disable for %p\n", vq);
> - return IRQ_HANDLED;
> - }
> -
> pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback);
> if (vq->vq.callback)
> vq->vq.callback(&vq->vq);
that part makes sense.
> diff -r 95a02f0e0e21 include/linux/virtio_config.h
> --- a/include/linux/virtio_config.h Tue May 27 12:45:17 2008 +1000
> +++ b/include/linux/virtio_config.h Tue May 27 15:53:41 2008 +1000
> @@ -14,6 +14,10 @@
> #define VIRTIO_CONFIG_S_DRIVER_OK 4
> /* We've given up on this device. */
> #define VIRTIO_CONFIG_S_FAILED 0x80
> +
> +/* Do we get callbacks when the ring is completely used, even if we've
> + * suppressed them? */
> +#define VIRTIO_F_NOTIFY_ON_EMPTY 24
24?
Does that mean the first 24 bits are driver owned and 24-31 are for the
common virtio code?
Christian
prev parent reply other threads:[~2008-05-30 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 5:12 [PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty Rusty Russell
2008-05-30 5:13 ` [PATCH 2/3] lguest: implement VIRTIO_F_NOTIFY_ON_EMPTY Rusty Russell
2008-05-30 5:14 ` [PATCH 3/3] virtio: use callback on empty in virtio_net Rusty Russell
2008-05-30 8:59 ` Christian Borntraeger [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=200805301059.48462.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--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).