diff mbox

virtio: put last seen used index into ring itself

Message ID 4BF26B87.3080902@redhat.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Jes Sorensen May 18, 2010, 10:27 a.m. UTC
On 05/18/10 02:47, Michael S. Tsirkin wrote:
> Generally, the Host end of the virtio ring doesn't need to see where
> Guest is up to in consuming the ring.  However, to completely understand
> what's going on from the outside, this information must be exposed.
> For example, host can reduce the number of interrupts by detecting
> that the guest is currently handling previous buffers.
> 
> Fortunately, we have room to expand: the ring is always a whole number
> of pages and there's hundreds of bytes of padding after the avail ring
> and the used ring, whatever the number of descriptors (which must be a
> power of 2).

Hi Michael,

Small build fix for this against Linus upstream.

Jes


Fix build of virtio_net.c

Signed-off-by: Jes.Sorensen@redhat.com
---


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

Comments

Michael S. Tsirkin May 18, 2010, 10:25 a.m. UTC | #1
On Tue, May 18, 2010 at 12:27:19PM +0200, Jes Sorensen wrote:
> On 05/18/10 02:47, Michael S. Tsirkin wrote:
> > Generally, the Host end of the virtio ring doesn't need to see where
> > Guest is up to in consuming the ring.  However, to completely understand
> > what's going on from the outside, this information must be exposed.
> > For example, host can reduce the number of interrupts by detecting
> > that the guest is currently handling previous buffers.
> > 
> > Fortunately, we have room to expand: the ring is always a whole number
> > of pages and there's hundreds of bytes of padding after the avail ring
> > and the used ring, whatever the number of descriptors (which must be a
> > power of 2).
> 
> Hi Michael,
> 
> Small build fix for this against Linus upstream.
> 
> Jes
> 
> 
> Fix build of virtio_net.c
> 
> Signed-off-by: Jes.Sorensen@redhat.com

Thanks, this is already fixed in v2 that I sent.

> ---
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index d37e5be..679e2df 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -23,6 +23,7 @@
>  #include <linux/module.h>
>  #include <linux/virtio.h>
>  #include <linux/virtio_net.h>
> +#include <linux/virtio_ring.h>
>  #include <linux/scatterlist.h>
>  #include <linux/if_vlan.h>
>  #include <linux/slab.h>
> 
--
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
diff mbox

Patch

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d37e5be..679e2df 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -23,6 +23,7 @@ 
 #include <linux/module.h>
 #include <linux/virtio.h>
 #include <linux/virtio_net.h>
+#include <linux/virtio_ring.h>
 #include <linux/scatterlist.h>
 #include <linux/if_vlan.h>
 #include <linux/slab.h>