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

2013-07-11 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Tue, Jul 09, 2013 at 11:46:23AM +0930, Rusty Russell wrote: >> "Michael S. Tsirkin" 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 thi

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

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

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

2013-06-08 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

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

2013-06-06 Thread Rusty Russell
"Michael S. Tsirkin" 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 first s

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 h

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

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