Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-07-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Jul 09, 2013 at 11:46:23AM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-07-11 Thread Michael S. Tsirkin
On Tue, Jul 09, 2013 at 11:46:23AM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since existing

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-09 Thread Michael S. Tsirkin
On Fri, Jun 07, 2013 at 10:52:01AM +0800, Jason Wang wrote: On 06/06/2013 05:55 PM, Michael S. Tsirkin wrote: For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since some

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-09 Thread Michael S. Tsirkin
On Fri, Jun 07, 2013 at 11:42:43AM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since some older

[Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-06 Thread Michael S. Tsirkin
For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since some older hypervisors (e.g. qemu before version 1.5) required that header is the first s/g element, we need a feature bit for

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-06 Thread Jesse Larrew
Hi Michael! On 06/06/2013 04:55 AM, Michael S. Tsirkin wrote: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c9e0038..d35a097 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -106,6 +106,9 @@ struct virtnet_info { /* Has control virtqueue

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-06 Thread Jesse Larrew
On 06/06/2013 03:09 PM, Dave Jones wrote: On Thu, Jun 06, 2013 at 02:59:44PM -0500, Jesse Larrew wrote: pr_debug(%s: xmit %p %pM\n, vi-dev-name, skb, dest); +if (vi-mergeable_rx_bufs) +hdr_len = sizeof hdr-mhdr; +else +

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-06 Thread Dave Jones
On Thu, Jun 06, 2013 at 02:59:44PM -0500, Jesse Larrew wrote: pr_debug(%s: xmit %p %pM\n, vi-dev-name, skb, dest); + if (vi-mergeable_rx_bufs) + hdr_len = sizeof hdr-mhdr; + else + hdr_len = sizeof hdr-hdr; All conditionals need braces.

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-06 Thread Jason Wang
On 06/06/2013 05:55 PM, Michael S. Tsirkin wrote: For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since some older hypervisors (e.g. qemu before version 1.5) required that header

Re: [Qemu-devel] [PATCH] virtio-net: put virtio net header inline with data

2013-06-06 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since some older hypervisors (e.g. qemu before version 1.5) required that header is the